mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-11-13 20:23:00 -08:00
Fix http outbound
Get correct TLS negotiated protocol when stats setting exists
This commit is contained in:
1 parent
1acb2fd854
commit
cae278dd00
1 file changed
+6
-1
@@ -197,8 +197,13 @@ func setUpHTTPTunnel(ctx context.Context, dest net.Destination, target string, u
|
||||
return nil, err
|
||||
}
|
||||
|
||||
iConn := rawConn
|
||||
if statConn, ok := iConn.(*internet.StatCouterConnection); ok {
|
||||
iConn = statConn.Connection
|
||||
}
|
||||
|
||||
nextProto := ""
|
||||
if tlsConn, ok := rawConn.(*tls.Conn); ok {
|
||||
if tlsConn, ok := iConn.(*tls.Conn); ok {
|
||||
if err := tlsConn.Handshake(); err != nil {
|
||||
rawConn.Close()
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user