things-go / go-socks5

socks5 server in pure Golang with much custom optional. Full TCP/UDP and IPv4/IPv6 support.
MIT License
368 stars 59 forks source link

Handle UDP DST.ADDR 0.0.0.0 #29

Closed fipso closed 9 months ago

fipso commented 1 year ago

Hello, it seems like this lib does not support the full UDP ASSOCIATE spec. The client may send 0.0.0.0 as DST.ADDR and expect that he can just send UDP packages with any possible target address later.

The current handle associate implementation will break here, because it assumes that the target ip is a valid target ip to dial target, err := dial(ctx, "udp", request.DestAddr.String())