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 module has changed the libraries and this script wont work anymore. Can anybody help me and explain this ?