echo icon indicating copy to clipboard operation
echo copied to clipboard

Enhance connection handling in proxyRaw function

Open eball opened this issue 2 months ago • 2 comments

Refactor proxyRaw function to prioritize DialTLSContext and DialContext for establishing connections.

eball avatar Oct 22 '25 04:10 eball

Could you explain/describe what the intention of this change is and in which use-case you would benefit from it?

aldas avatar Oct 22 '25 07:10 aldas

In non-WebSocket scenarios, proxyHttp allows customizing the dial behavior by defining a dialContext function in the transport configuration. Therefore, in WebSocket scenarios, I also hope to be able to customize the dial process through the dialContext function in the transport. For example, in one of my scenarios, when establishing a WebSocket TLS connection, the TCP dial connects to localhost, but during the TLS handshake, I need to add domain name information in the SNI.

eball avatar Oct 22 '25 07:10 eball