mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 16:02:32 +00:00
leaf's SOCKS5 outbound had the same fault as the C and Zig plugins: with credentials configured it offered "no authentication" as well, and carried on if the server picked it. It used async-socks5, which always offers both, so the handshake is now leaf's own and the dependency is gone. With credentials set, username/password is the only method offered, and a server that picks anything else is refused before the request goes out. A password set without a username, which would quietly turn authentication off, is a configuration error, as it is on the inbound. That also fixes three things in its UDP path: a reply that could not be parsed ended the association instead of being dropped; a relay given as 0.0.0.0 sent datagrams to this host rather than to the server; and the UDP ASSOCIATE request named the server as DST.ADDR, where RFC 1928 wants the client's sending address or zeros, so a server that enforced it dropped every datagram. It now sends zeros.