-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add optional method ProxyTLSConnection (closes #779) #782
base: main
Are you sure you want to change the base?
Conversation
Removed the call to NetDialTLSContext from the HTTP proxy CONNECT step and replaced it with a regular net.Dial in order to prevent connection issues. Custom TLS connections can now be made via the new optional ProxyTLSConnection method, after the proxy connection has been successfully established.
Thanks for the commit. I know it's been a long time but it would be good to see a test to go with this PR. I'm not fully confident in merging without associated tests. |
It also looks like this PR does something similar: https://github.com/gorilla/websocket/pull/740/files maybe consider using that PR to bolster your own. |
Not sure if this fixes the issue completely. The PR you mention adds support for HTTPS proxies whereas this PR fixes a bug where |
It's been so long. Can't say when/if I'll be able to find the time to look into this again and add tests. |
Previously, it was impossible to specify both
Proxy
andNetDialTLSContext
on the websocketDialer
without experiencing connection issues. This commit brings a change to the proxy CONNECT flow so that the initial connection is always a normal proxy CONNECT over TCP, while allowing TLS customizations on the existing connection at a later point in time via the newProxyTLSConnection
method.Fixes #779
Summary of Changes
Please see my comment on the relevant issue for a detailed explanation and my thought process: #779 (comment)
Tests are not included, I'd appreciate some help or guidance on that front because I'm unsure what to test, thanks!