From 772d6026f2d001e7297edb2fb7a9dafa0e4ae11b Mon Sep 17 00:00:00 2001 From: miladj <16033489+miladj@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:13:59 +0330 Subject: [PATCH] Replace destination address in create udp listener --- pkg/socks5/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/socks5/server.go b/pkg/socks5/server.go index 3214c5f..6ca9634 100644 --- a/pkg/socks5/server.go +++ b/pkg/socks5/server.go @@ -294,7 +294,7 @@ func (s *Server) embedHandleConnect(req *request) error { func (s *Server) handleAssociate(req *request) error { destinationAddr := req.DestinationAddr.String() - udpConn, err := s.ProxyListenPacket(s.Context, "udp", destinationAddr) + udpConn, err := s.ProxyListenPacket(s.Context, "udp", "0.0.0.0:0") if err != nil { if err := sendReply(req.Conn, errToReply(err), nil); err != nil { return fmt.Errorf("failed to send reply: %v", err)