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

@ -21,7 +21,6 @@ import (
"github.com/Dreamacro/clash/transport/vless"
"github.com/Dreamacro/clash/transport/vmess"
M "github.com/sagernet/sing/common/metadata"
xtls "github.com/xtls/go"
)
@ -358,7 +357,7 @@ func (pc *PacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, er
pc.mux.Lock()
defer pc.mux.Unlock()
destination, err := M.SocksaddrSerializer.ReadAddrPort(pc.Conn)
destination, err := socks5.ReadAddr0(pc.Conn)
if err != nil {
return nil, nil, nil, err
}