mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-15 09:34:00 +08:00
HTTP outbound: Read negotiated protocol from uTLS (#5251)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user