From 95e0f0e675078a02c5d793ad6d4593cf6586b716 Mon Sep 17 00:00:00 2001 From: Erik Pellizzon Date: Sun, 12 Jan 2025 23:53:44 +0100 Subject: [PATCH] Explicitly call handshake for tls connection --- https.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/https.go b/https.go index 705a66f3..6d20e04a 100644 --- a/https.go +++ b/https.go @@ -651,5 +651,9 @@ func (proxy *ProxyHttpServer) initializeTLSconnection( if ctx.InitializeTLS != nil { return ctx.InitializeTLS(targetConn, tlsConfig) } - return tls.Client(targetConn, tlsConfig), nil + tlsConn := tls.Client(targetConn, tlsConfig) + if err := tlsConn.Handshake(); err != nil { + return nil, err + } + return tlsConn, nil }