HTTP Node: Proxy to HTTPS URI

Hi,

I am trying to proxify a connection to an HTTPS URI using HTTP node.
After defining proxy as Options inside node, and trying to do a GET request against the HTTPS URI, I get next result:

ERROR: RequestError: Error: tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established

Is it possible to enable this as an option when using a proxy? Or autodetection could do the trick too.

Thanks!

Do not understand. What option should we be adding exactly? My understanding is that it should already be working. If you add the option “Proxy”, it sets “proxy” on the request that is all. Here the documentation:

If you see there any other option that would be helpful but is currently not exposed simply tell us. Adding it takes just a few minutes.

Additionally, can you also try to remove the “Proxy” option and set the environment variables HTTP_PROXY and HTTPS_PROXY that should as far as I know do the same.

Allright. I will try with HTTPS_PROXY env variable.
Thanks!

I have solved it without setting up environment variables.
Thanks Jan!

Can you please share how you solved it that other people that have the same problem in the future also know what to do. Thanks!

It was my fault. I was pointing to an invalid proxy port :frowning:
So, by default everything works ok with proxy enabled.

Thanks Jan!

Ah ok makes sense then. Thanks!

Hi Miquel,

Simple question but what kind of URL did you input in the proxy field ? I am trying to access dynamic URL and I don’t know how to set up the proxy.

When I try with a simple solution like https://www.proxysite.com/ I get an error :

ERROR: RequestError: Error: tunneling socket could not be established, cause=Hostname/IP does not match certificate’s altnames: Host: www.site.fr. is not in the cert’s altnames: DNS:proxysite.com, DNS:*.proxysite.com

Regards

Hi @mumudu22,

You need to use an http proxy with https support embedded.
This is how we scrape things at uProc.io.

Please, provide an URI like http://proxyaddress:port and use an https address in your URL property. It works like a charm.

You can found a big proxies list at:

Choose proxies with HTTP+HTTPs support in your country - or near - with high speed.

I have tried with this proxy and it works ok (probably using Squid proxy)
http://176.113.73.103:3128

Check it please!

1 Like

Ok thanks for both the explanations and the list !

I tried with several proxys but I always get the same error “ERROR: RequestError: Error: tunneling socket could not be established, statusCode=403”.

(I also tried a flow on n8n cloud and it’s not working, therefore it’s not because I was running n8n localy on my computer)

And have you tried this one
http://176.113.73.103:3128/
?

It worked for me a couple of days ago.

Indeed I think it’s working now !
But I think that the browser is preventing me from accessing and asking me for a captcha validation or something like that.

I get this message on the right hand side of n8n

Yes. That makes sense.
I recommend you to try any proxy service with captcha solver.