fix(outbounds): incorrect use of SOCKS5 UDP dst.addr & dst.port (#1583)

This commit is contained in:
Toby 2026-05-21 16:08:15 -07:00 committed by GitHub
parent 2412f23646
commit 3b64f66995
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -180,8 +180,7 @@ func (s *socks5Outbound) UDP(reqAddr *AddrEx) (UDPConn, error) {
if err != nil {
return nil, err
}
atyp, dstAddr, dstPort := addrExToSOCKS5Addr(reqAddr)
req := socks5.NewRequest(socks5.CmdUDP, atyp, dstAddr, dstPort)
req := socks5.NewRequest(socks5.CmdUDP, socks5.ATYPIPv4, []byte{0, 0, 0, 0}, []byte{0, 0})
resp, err := s.request(conn, req)
if err != nil {
_ = conn.Close()