Files
x/internal/util
ginuerzh ee7b1e9462 fix(handler/socks5): resolve UDP domains via configured resolver to stop DNS leak
SOCKS5 UDP datagrams carrying ATYP=DOMAINNAME were force-resolved via
net.ResolveUDPAddr in udpConn.ReadFrom, which always used the system
resolver and ignored any configured handler resolver (resolver=1.1.1.1),
leaking the query locally. The premature domain→IP conversion also
stripped the hostname before it reached the relay chain, so the exit
node could not resolve DNS itself.

udpConn.ReadFrom now returns a domainAddr for domain targets, letting
the name flow untouched through udp.Relay into the upstream WriteTo.
Chain-backed PacketConns (udpTunConn, udpRelayConn) encode it as
ATYP=Domain and forward to the exit. Direct (no-chain) associations
yield a raw *net.UDPConn that cannot consume a domainAddr, so they are
wrapped with resolvePacketConn, which resolves via hostMapper →
configured resolver → system DNS.
2026-06-27 16:12:36 +08:00
..
2023-10-19 23:47:47 +08:00
2022-04-13 21:30:30 +08:00
2025-08-04 19:29:38 +08:00
2022-03-14 20:27:14 +08:00
2023-10-15 23:55:52 +08:00
2022-03-14 20:27:14 +08:00
2025-07-26 16:17:04 +08:00
2025-02-25 20:39:33 +08:00
2025-08-04 19:29:38 +08:00
2025-08-03 10:15:53 +08:00