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

can n8n not just add socks5 support in the normal docker image?

Do not think we should add a dependency of something that is rarely use. You can always add that to the base image and then deploy it. In the future we might make it easier to add npm packages to the function node.

Without the telemetry from self hosted it may be hard to confirm its rarely used, people may just not post on the forums and use another tool to solve their issue.

Having the redeploy the docker and add the dependencies is a pain in the bum, much easier if it was simple part of the normal docker and users can decide to enable it via the ENV variable if wanted or was simply an enhancement to HTTP request node. Cant imaging it would add much bloat to it in reality.


1 Like

If we follow that philosophy, then we would have to add to the docker image all the npm packages the community is using? So we end up with hundreds of dependencies (and the dependencies of those dependencies) that n8n it’s not using, but we think some community members might ever use in the function node?

I’m afraid I have to disagree with that. But, yes, I do not have the numbers to back up my statement. We know that adding “custom” dependencies is a pain. As I mentioned earlier, we have talked about improving this as we have talked about improving many other things. Sadly, we are a really small team and have to be very careful in what we spend our resources on if we want to create a successful company.

Maybe this is something that is prioritized in the next quarter. Who knows?

1 Like

totally get it, your call just wanted to highlight it.

Thanks for all the work you do with n8n, without it, I wouldn’t be able to do any of the workflows that are useful to me.


Xref here Socks5 support in http request node for the Desktop version?