websocket icon indicating copy to clipboard operation
websocket copied to clipboard

Add optional method ProxyTLSConnection (closes #779)

Open sleeyax opened this issue 3 years ago • 4 comments

Previously, it was impossible to specify both Proxy and NetDialTLSContext on the websocket Dialer 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 new ProxyTLSConnection method.

Fixes #779

Summary of Changes

Please see my comment on the relevant issue for a detailed explanation and my thought process: https://github.com/gorilla/websocket/issues/779#issuecomment-1125185896

Tests are not included, I'd appreciate some help or guidance on that front because I'm unsure what to test, thanks!

sleeyax avatar May 12 '22 16:05 sleeyax