#1903·Throne

Latency test always fails for profiles with a domain server address: the test instance's DNS is caught by Throne's own auto_redirect rule

Author: mutyshwarzkopf-a11yCreated Sep 20, 2026Updated Sep 22, 2026
Labelsbug

Operating system

Linux

System version

debian

Installation type

deb

Version

1.3.0

Description

With TUN + auto_redirect (the Linux default), Throne installs an nftables rule that DNATs every UDP/53 packet to the TUN DNS address. The main core marks its own sockets, so it is unaffected.

The temporary sing-box instance used for the latency test does not set that mark on its DNS path, while its sockets are still bound to the default interface. So the query is redirected to the TUN address but then sent out the physical interface, where nothing answers it. After the 3 s test timeout everything is canceled.

Every profile with a domain server address is affected; profiles with an IP address test fine, since they need no DNS at all. The routing profile makes no difference.

Reproduction

  1. Linux, TUN mode with auto_redirect, Direct DNS = localhost, /etc/resolv.conf pointing at a public resolver (not a private-range one).
  2. Create a profile whose server address is a domain name.
  3. Run the latency test — it always fails after exactly 3 s.
  4. tcpdump during the test shows the query leaving on the wrong interface: eth0 Out .58367 > 172.19.0.2.53: A? and a second one 3 s later, after the test was already canceled, going out through the TUN and getting answered.
  5. One UDP query to 9.9.9.9:53 as root, three socket variants: bound to eth0 + mark 0x2024 -> 93 ms, answered (what the main core does) bound to eth0, no mark -> timeout (what the test instance does) not bound, no mark -> 28 ms, answered (normal app)

Workarounds: add the resolver's IP to the TUN private-range bypass list, or point Direct DNS at a private-range resolver such as the LAN router. DoT/DoH for Direct DNS also avoids the rule, but it took 0.7-2.8 s here, which nearly eats the whole 3 s budget. Turning auto_redirect off fixes the test but breaks the tunnel on Linux.

Ideally the test instance would mark its DNS the same way the main core does. Adding the configured direct-DNS servers to the bypass list automatically would fix this class of problems more generally, since the same trap catches anything that binds a socket and resolves over plain DNS.

Logs

bash
ERROR[0003] dns: lookup failed for <server-domain>: context canceled
  [Error] transport/internet: failed to resolve ip > lookup <server-domain>: context canceled
  [<profile>] test error: Get "http://cp.cloudflare.com/": context deadline exceeded