Files
leaf/docs
eric 99258453cf fix(socks): authenticate UDP and SOCKS4 when a password is required
A socks inbound with a username checked it on SOCKS5 TCP and nowhere
else. SOCKS4 has no password, and was accepted anyway, so any client
could skip the check by speaking the older protocol. The UDP relay
answered datagrams from any address. And a username with no password
panicked on the right username, which a release build turns into an
abort.

With a username set, SOCKS4 is now refused, and the relay drops datagrams
from any IP address without an open, authenticated UDP ASSOCIATE
connection, as RFC 1928 asks; the association ends with that connection.
It is open before the reply goes out, since a client may send its first
datagram the moment it reads the reply. A username without a password
means an empty password, and a password without a username is a
configuration error instead of silently turning authentication off.

The UDP check is by IP address, since a client's sending port is not
known in advance; the docs say what that leaves open.
2026-12-04 09:55:40 +08:00
..
2026-03-01 08:06:52 +08:00
2026-03-19 07:17:33 +08:00