mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
Locally originated DNS queries are marked 0x40 by DNS_MARK in mangle OUTPUT, then nat OUTPUT REDIRECT rewrites their destination port from 53 to 52353. When the packet re-enters PREROUTING via loopback, the dport-53 TPROXY rule no longer matches, so the generic mark-0x40 rule diverts it to the transparent proxy port 52345 where it is dropped. All local UDP DNS times out and transparent proxy appears completely broken (TCP DNS survives because the proxied connection still reaches 52353). Add TP_PRE RETURN rules for dport 52353 ahead of the TPROXY rules in the legacy IPv4, legacy IPv6, and nftables variants so already-redirected DNS traffic is delivered to the DNS module untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>