Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP_PROXY, HTTPS_PROXY, NO_PROXY parameters ignored #148

Open
e-zhydzetski opened this issue Dec 9, 2021 · 1 comment
Open

HTTP_PROXY, HTTPS_PROXY, NO_PROXY parameters ignored #148

e-zhydzetski opened this issue Dec 9, 2021 · 1 comment

Comments

@e-zhydzetski
Copy link

e-zhydzetski commented Dec 9, 2021

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.

@Davincible
Copy link

Davincible commented Apr 4, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants