proxy: added PackerServer interface

This commit is contained in:
nadoo committed 2022-01-16 23:15:18 +08:00
1 parent 253e5008c4
commit cf1a4e3817
11 files changed
+52 -22

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ func NewPktConn(c net.Conn, tgtAddr socks.Addr) *PktConn {
// ReadFrom implements the necessary function of net.PacketConn.
// NOTE: the underlying connection is not udp, we returned the target address here,
// it's not the vless server's address, do not WriteTo it.
// it's not the server's address, do not WriteTo it.
func (pc *PktConn) ReadFrom(b []byte) (int, net.Addr, error) {
// ATYP, DST.ADDR, DST.PORT
_, err := socks.ReadAddr(pc.Conn)