HTTP Node: Proxy to HTTPS URI


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.


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.

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!