SOCKS5 has been around long enough that it predates most of the devices that now support it. Along with HTTP CONNECT, it remains one of the default proxy protocols baked into browsers, operating systems, and client apps. One of its advertised features is UDP relaying, which sounds great for games and for live-commerce video calls. The catch is that turning on UDP support on the server does not mean UDP traffic will actually make it through.
The short version
Unless a server has a special implementation, SOCKS5 does not handle TCP and UDP on the same port. UDP gets a separate port. In practice, a client connects to the proxy on one port, and the server opens another random port for the UDP relay. That second port is the source of most failures.
What RFC 1928 actually says
RFC 1928 defines a UDP ASSOCIATE request. The reply includes BND.PORT and BND.ADDR, which tell the client where to send UDP request messages for relaying. That is not necessarily the port the client originally connected to, and it is not necessarily the same machine. The server can choose a new port, and the spec does not force it to use the original server address. The relay usually keeps forwarding until the TCP control connection to the original proxy port closes.
Some implementations let you constrain the port range for firewall control, but that only makes the separate-port behavior more predictable; it does not remove it. The random port is still not something a firewall administrator can reliably anticipate.
Where this goes wrong
Take a SOCKS5 server listening on TCP port 1080 with UDP relaying enabled.
Firewall only allows 1080
You open 1080 in the firewall. TCP proxying works. The client sends a UDP associate request, and the server starts listening on something like UDP 4170 and tells the client to send UDP there. The firewall has never heard of 4170, so it drops the inbound UDP packets. The client cannot send, and the relay cannot work.
NAT has no mapping for the extra port
The same problem appears when the SOCKS5 server sits behind NAT. If the only port forward is 1080, or if the VPS provider only exposes a limited set of ports, the random UDP port has no mapping. Incoming UDP packets for that port are dropped before they reach the proxy.
The tunnel only covers TCP
There is a classic setup that uses Stunnel to build a TLS tunnel and then runs an HTTP proxy inside it—Squid plus Stunnel, for example. The TLS tunnel protects the connection and the inner protocol can be fairly relaxed. HTTP proxying is also easy to fingerprint under active probing: responses such as 407 Auth Required or 200 Connection Established are strong hints.
Naturally, people asked whether the same trick works with SOCKS5. Point Stunnel at port 1080, adjust the client, connect, and it seems to work.
Except for UDP. The TCP side is fine, and since ordinary browsing is mostly TCP and SOCKS5 can do remote DNS resolution, the problem can stay hidden until a game fails to connect or a live-commerce video call will not go through. The TLS tunnel is doing its job for TCP, but the UDP path does not pass through Stunnel. According to how SOCKS5 UDP relaying works, the UDP datagrams go to the relay address directly. In that setup, UDP is outside the tunnel.
Being outside the tunnel does not always mean it fails. It may still connect. The more serious issue is that the UDP target address is carried in the packet itself, prepended to the datagram. Anyone in the middle can see both the destination and the payload. If the UDP content is something you would rather not expose, that is a problem.
Workarounds people actually use
The usual fix is to change protocols. SOCKS5’s structure is not a good fit for deep modification.
Shadowsocks is a common alternative. It listens on separate TCP and UDP ports, which avoids the same-port assumption. The fact that TCP and UDP can both use port 1080 does not mean they share one listener. TCP and UDP are separate protocols; a port is just a number in each, and both ranges run from 1 to 65535.
If UDP needs encryption, TLS is not the right tool; DTLS is the transport-layer option. This is also why many Shadowsocks plugins just pass UDP through—the plugin often cannot process it. On mobile, an SS node can also get blocked quickly because TCP and UDP are handled as separate protocols or obfuscations on the same port, which leaves a noticeable traffic pattern.
Another approach is UDP over TCP, or UoT. It treats UDP traffic as TCP, so TCP-oriented protections such as TLS can be applied to the whole stream. OpenVPN, VMess, and Trojan are commonly discussed in this context.
The point is not that SOCKS5 UDP is useless. It works when the firewall, NAT, and tunnel are all aware of the extra relay port. It just does not work by default in many real deployments, and the failure is easy to miss because TCP keeps working.