ws icon indicating copy to clipboard operation
ws copied to clipboard

HTTP_PROXY, HTTPS_PROXY, NO_PROXY parameters ignored

Open e-zhydzetski opened this issue 4 years ago • 1 comments

Problem with client side of the library behind a corporate proxy. HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment parameters ignored during connection. Definitely, it is possible to make self proxy-aware Dialer implementation, but looking at the standard library it seems that default implementation should honor *_PROXY params out of the box.

e-zhydzetski avatar Dec 09 '21 15:12 e-zhydzetski

@e-zhydzetski did you manage to get a proxy working with the websockets? I can't seem to get it working

Edit: Got it working, turns out the net/proxy package only supports socks5 proxies, and I was using an HTTP proxy. You need to register a custom dialer to make that work.

For anyone else finding this issue later on, copy the code from here (except for the main function), it will register the dialers, and afterwards you can use HTTP proxies.

Davincible avatar Apr 04 '22 16:04 Davincible