From 28636a5e6055fa2b0ecc314259ee52c159092035 Mon Sep 17 00:00:00 2001 From: Vasyl Gello Date: Mon, 15 Jul 2024 16:15:34 +0300 Subject: [PATCH] PacketConn has no Read Signed-off-by: Vasyl Gello --- src/types/udpproxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/udpproxy.go b/src/types/udpproxy.go index 883c293..4350d0b 100644 --- a/src/types/udpproxy.go +++ b/src/types/udpproxy.go @@ -7,7 +7,7 @@ import ( func ReverseProxyUDP(mtu uint64, dst net.PacketConn, dstAddr net.Addr, src net.PacketConn) error { buf := make([]byte, mtu) for { - n, err := src.Read(buf[:]) + n, _, err := src.ReadFrom(buf[:]) if err != nil { return err }