var fs = require('fs');
var socks = require('socks');
var proxies = fs.readFileSync('proxies.txt').replace(/\r/g, '').split('\n');
function createAgent() {
var proxy = proxies[Math.floor(Math.random() * proxies.length)];
return new socks.Agent({
ipaddress: proxy[0],
port: proxy[1],
type: 5
});
}
Socks 模块已更改库,此脚本将不再工作。有人可以帮我解释一下吗?