Error when using a proxy in the HTTP request node

When I use a proxy, whatever host/IP is, I get this error.

{"status":"rejected","reason":{"message":"write EPROTO 139908850628544:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n","name":"Error","stack":"Error: write EPROTO 139908850628544:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n\n    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)","code":"EPROTO"}}

How could I possibly solve this?

Don’t hesitate to ask for more details.

Can you show the node settings for the URL and the proxy? Is it a http or https proxy?

It is an HTTPS proxy.
2022-07-06_13-36

Bumping, I’m still having this wrong version number:.. error.

Hey @Loan_J,

The error message is normally around a protocol mismatch, In this case probably trying to use TLS but getting SSL.

What proxy are you using and does the proxy log any events?

Hey,

I’m using https://proxyscrape.com. I don’t have any logs from the proxy.

Hey @Loan_J,

That proxy you are using doesn’t appear to allow connections on HTTPS and on HTTP it requires authentication. I suspect these are the issues you are seeing.

You simply need to allow your IP in their interface. That’s what I did but it doesn’t work and renders into the error I referenced above

Did you try HTTP as it doesn’t appear to be for HTTPS. I did a quick test with the s_client option of OpenSSL to check this.

Yes, tried both

are you able to use the http proxy in curl like this?

curl -v --proxy https://192.151.150.174:2000 https://httpbin.org/ip

Seems like it doesn’t work and times out. Should I find another proxy? I don’t have much knowledge about proxies so if you have any ideas, it’d be appreciated.

Hey @Loan_J,

Yes another one might be a good idea just to see if it is an issue with that proxy.

Hey @Jon
It looks like the issue might be coming from n8n’s HTTP node rather than from my proxy. I tried using multiple different proxies (with and w/o HTTPS) but it doesn’t work still. I have found some forum topics about people having a similar issue. Might it come from the library the node uses?

Hey @Loan_J,

It could be although I managed to get it working with a local proxy last week while testing another issue. Have you tried setting up a local proxy to see if that has the same issue?

I haven’t tried. Perhaps you have some sort of guide for me to follow to setup a local proxy for n8n? I’m not familiar with proxies.

Hey @Loan_J,

I don’t have a specific guide for setting up proxies but there are a few out there, Out of interest how do you have n8n installed? Is it in docker?

In this case my install is using n8n’s NPM package

Hey @Loan_J,

I wonder if the HTTP_PROXY and HTTPS_PROXY env options are just for docker or if Node generally picks them up.

You could try setting them and ignore the proxy option in the http request node and see what happens, Did you manage to test the proxies using curl from the same machine as well?

Tried to add these variables, seems like it didn’t have any effect.