mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-17 12:44:36 +03: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
|
return nil, err
|
||||||
}
|
}
|
||||||
nextProto = tlsConn.ConnectionState().NegotiatedProtocol
|
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 {
|
switch nextProto {
|
||||||
|
|||||||
Reference in New Issue
Block a user