mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-26 06:39:20 +02:00
Fix unwrap tls conn
This commit is contained in:
parent
36321b8750
commit
cf575be678
|
@ -9,7 +9,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
gotls "crypto/tls"
|
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
@ -449,7 +448,7 @@ func UnwrapRawConn(conn net.Conn) (net.Conn, stats.Counter, stats.Counter) {
|
||||||
readCounter = statConn.ReadCounter
|
readCounter = statConn.ReadCounter
|
||||||
writerCounter = statConn.WriteCounter
|
writerCounter = statConn.WriteCounter
|
||||||
}
|
}
|
||||||
if xc, ok := conn.(*gotls.Conn); ok {
|
if xc, ok := conn.(*tls.Conn); ok {
|
||||||
conn = xc.NetConn()
|
conn = xc.NetConn()
|
||||||
} else if utlsConn, ok := conn.(*tls.UConn); ok {
|
} else if utlsConn, ok := conn.(*tls.UConn); ok {
|
||||||
conn = utlsConn.NetConn()
|
conn = utlsConn.NetConn()
|
||||||
|
|
Loading…
Reference in New Issue