Skip to content

Commit

Permalink
Fix unwrap tls conn
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan6665 committed Sep 21, 2023
1 parent 36321b8 commit cf575be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"bytes"
"context"
"crypto/rand"
gotls "crypto/tls"
"io"
"math/big"
"runtime"
Expand Down Expand Up @@ -449,7 +448,7 @@ func UnwrapRawConn(conn net.Conn) (net.Conn, stats.Counter, stats.Counter) {
readCounter = statConn.ReadCounter
writerCounter = statConn.WriteCounter
}
if xc, ok := conn.(*gotls.Conn); ok {
if xc, ok := conn.(*tls.Conn); ok {
conn = xc.NetConn()
} else if utlsConn, ok := conn.(*tls.UConn); ok {
conn = utlsConn.NetConn()
Expand Down

0 comments on commit cf575be

Please sign in to comment.