title: Doing http requests through a SOCKS5 proxy in NodeJS
body: <p>I'm planning to do a series of HTTP requests in NodeJS though Tor.<br>
  Tor uses SOCKS5 so I went out and searched for a way to proxify HTTP requests in NodeJS.<br>
  I'm planning to the the default http.request() function to do the work.<br> However, I can't seem to find a way to use a proxy with that.<br> Someone suggested that I could do this:</p>
  
  <pre><code>var http = require("http");
  var options = {
    host: "localhost",
    port: 9050,
    path: "http://check.torproject.org",
    method: 'GET',
    headers: {
      Host: "http://check.torproject.org",
    }
  };
  var req = http.request(options, function(res) {
    res.on('data', function (chunk) {
      console.log('BODY: ' + chunk);
    });
  });
  </code></pre>
  
  <p>But it didn't work.<br>
  So, any suggestions?</p>