From e914183996a6d8c4742ee9adc7c97ad72beb5629 Mon Sep 17 00:00:00 2001 From: hax0r31337 <65506006+hax0r31337@users.noreply.github.com> Date: Fri, 21 Nov 2025 03:29:25 +0100 Subject: [PATCH] HTTP outbound: Read negotiated protocol from uTLS (#5251) --- proxy/http/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proxy/http/client.go b/proxy/http/client.go index d5be2acb..9544ad37 100644 --- a/proxy/http/client.go +++ b/proxy/http/client.go @@ -308,6 +308,12 @@ func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, u return nil, err } nextProto = tlsConn.ConnectionState().NegotiatedProtocol + } else if tlsConn, ok := iConn.(*tls.UConn); ok { + if err := tlsConn.HandshakeContext(ctx); err != nil { + rawConn.Close() + return nil, err + } + nextProto = tlsConn.ConnectionState().NegotiatedProtocol } switch nextProto {