Fix read address

This commit is contained in:
世界
2025-09-05 15:16:14 +08:00
parent cbf48e9b8c
commit f352f84483
7 changed files with 12 additions and 12 deletions

View File

@@ -292,7 +292,7 @@ func ReadPacket(conn net.Conn, buffer *buf.Buffer) (M.Socksaddr, error) {
}
_, err = buffer.ReadFullFrom(conn, int(length))
return destination.Unwrap(), err
return destination, err
}
func WritePacket(conn net.Conn, buffer *buf.Buffer, destination M.Socksaddr) error {

View File

@@ -138,7 +138,7 @@ func (c *ClientBind) receive(packets [][]byte, sizes []int, eps []conn.Endpoint)
b := packets[0]
common.ClearArray(b[1:4])
}
eps[0] = remoteEndpoint(M.AddrPortFromNet(addr))
eps[0] = remoteEndpoint(M.SocksaddrFromNet(addr).Unwrap().AddrPort())
count = 1
return
}