chore: using internal socks5.ReadAddr0 in trojan

This commit is contained in:
wwqgtxx
2023-05-20 18:35:04 +08:00
parent 546b2bc24b
commit 984bf27d9b
3 changed files with 46 additions and 3 deletions

View File

@ -103,7 +103,7 @@ func (l *Listener) HandleConn(conn net.Conn, in chan<- C.ConnContext, additions
conn = l.pickCipher.StreamConn(conn)
conn = N.NewDeadlineConn(conn) // embed ss can't handle readDeadline correctly
target, err := socks5.ReadAddr(conn, make([]byte, socks5.MaxAddrLen))
target, err := socks5.ReadAddr0(conn)
if err != nil {
_ = conn.Close()
return