title: nodeJS - socks.Agent is not a constructor
body: <pre><code>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
           });
  }
  </code></pre>
  
  <p>Socks module has changed the libraries and this script wont work anymore.
  Can anybody help me and explain this ?</p>