Socks5 support in http request node?

I’m using via docker compose, so far so good, and I was able to declare an http and https proxy and get that working in the http request node.

However, I can’t seem to get a socks5 proxy working. Is there something different about the syntax, or n8n capabilities that I’m missing perchance?


It looks like that cannot be done just using the request library (which we use under the hood). You might need to import the library shown in the example and use it in a function node.

Hmm, not sure how to implement that with docker compose. Is there a way to just make a socks5 POST request with the function node and javascript? I’ve tried, but it always seems like the syntax in the function nodes is different than conventional javascript, and haven’t gotten it to work.

Yes, but again, you have to:

  1. Add the library socks5-http-client to /n8n/packages/nodes-base/package.json

  2. Reference the custom image in the docker-compose file.

  3. Set the env variable NODE_FUNCTION_ALLOW_EXTERNAL=socks5-http-client

  4. Require and use the library within the function node.

Got it working, thanks!

1 Like