socks5-https-client
socks5-https-client copied to clipboard
ECONNREFUSED
Hey,
I am facing some issue with the module.
vents.js:85
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
I am not sure how to proxy requests from nodejs to tor. I have tor running on my ubuntu and the browser running too with the tor-browser-en.sh I am not sure about what options I need to pass into the requst
require('socks5-https-client').request({
'url': url,
strictSSL: true,
agentClass: Agent,
agentOptions: {
// socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
socksPort: 9050 // Defaults to 1080.
}
}, function (error, response, body) {
//something
});
Please help. Thanks!