Add optional method ProxyTLSConnection (closes #779)#782
Add optional method ProxyTLSConnection (closes #779)#782sleeyax wants to merge 5 commits intogorilla:mainfrom
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
ProxyandNetDialTLSContexton the websocketDialerwithout 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 newProxyTLSConnectionmethod.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!