torsocks
blocks specific connection types to ensure that applications do not leak.
For this reason it is incompatible with certain applications, it seems that whatever inter-process channel method Node is using is one such connection method.
torsocks
itself should produce output to stderr to notify you if it blocked some function call and if so which and why. This should give you the necessary information to find a suitable solution.
One solution would be to get the node application to use a native SOCKS proxy, instead of using torsocks
to wrap the entire nodejs
process.
A worse solution might be to look at setting exceptions to the anti-leak protections put in place by torsocks
through tweaking torsocks.conf
(by default located at /etc/tor/torsocks.conf
), by for example setting AllowOutboundLocalhost 1
or if that still doesn't work AllowOutboundLocalhost 2
, where 1
allows you to make TCP connections to localhost, and 2
allows you to make both TCP and UDP connections to localhost. For more information, check out man 5 torsocks.conf
.