File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ type ProxyCtx struct {
1818 RoundTripper RoundTripper
1919 // Specify a custom connection dialer that will be used only for the current
2020 // request, including WebSocket connection upgrades
21- Dialer func (ctx context.Context , network string , addr string ) (net.Conn , error )
22- InitializeTLS func (rawConn net.Conn , cfg * tls.Config ) (net.Conn , error )
21+ Dialer func (ctx context.Context , network string , addr string ) (net.Conn , error )
2322 // will contain the recent error that occurred while trying to send receive or parse traffic
2423 Error error
2524 // A handle for the user to keep data in the context, from the call of ReqHandler to the
Original file line number Diff line number Diff line change @@ -662,11 +662,8 @@ func (proxy *ProxyHttpServer) initializeTLSconnection(
662662 tlsConfig = c
663663 }
664664
665- if ctx .InitializeTLS != nil {
666- return ctx .InitializeTLS (targetConn , tlsConfig )
667- }
668665 tlsConn := tls .Client (targetConn , tlsConfig )
669- if err := tlsConn .Handshake ( ); err != nil {
666+ if err := tlsConn .HandshakeContext ( ctx . Req . Context () ); err != nil {
670667 return nil , err
671668 }
672669 return tlsConn , nil
You can’t perform that action at this time.
0 commit comments