Clash Verge
TUN in Clash Verge and sing-box: UDP, DNS, versions and game latency
Configure TUN permissions, DNS and UDP forwarding, account for sing-box version changes, recover interrupted connectivity and measure the actual game route.

Your browser uses a proxy, but a game, voice call or another application still connects directly. One explanation is that the application ignores the system proxy settings. It is not sufficient evidence that the proxy server is broken; check which traffic the client actually receives.
TUN can capture traffic through a virtual network interface. This guide covers Clash Verge, sing-box, UDP forwarding and a recovery sequence if enabling TUN interrupts connectivity. Capture, successful forwarding and lower latency are three separate things.
Windows and macOS proxy settings tell compatible applications to use an HTTP or SOCKS proxy. Applications that ignore those settings keep using their normal connections. Many games do, and game or voice traffic commonly includes UDP. A conventional HTTP proxy does not transport arbitrary UDP; SOCKS UDP support depends on both application and proxy implementation.
Typical symptoms include:
- YouTube works in the browser, while the game's latency stays unchanged.
- Discord or in-game voice connects unreliably.
- A P2P tool does not use the configured proxy.
These symptoms identify things to investigate, not a diagnosis by themselves.
The client creates a virtual network interface and captures IP packets according to its routes. The engine then applies rules and forwards supported traffic. TCP and UDP are common uses; capturing an ICMP packet does not guarantee the chosen outbound can relay it. Excluded routes, IPv6 configuration and platform limitations also determine coverage.
| System proxy | TUN | |
|---|---|---|
| Layer | Application proxy, such as HTTP/SOCKS | IP traffic captured by a virtual interface |
| Coverage | Applications that use the settings | Configured system routes, with possible exclusions |
| UDP | Requires application and implementation support | Requires engine, outbound and server support |
| Permissions | Usually an ordinary user | Usually administrator/root or service capabilities |
| Typical use | Browser and compatible downloads | Games, voice and applications ignoring system proxy |
See the sing-box TUN reference for platform and field restrictions.
- You want a game's traffic to use a different route through a server.
- Discord or game voice needs UDP forwarding.
- An application ignores system proxy settings.
- Domain/IP rules need to cover traffic beyond individual configured applications.
For browser-only use, a working system proxy may be enough. TUN changes routes and requires more permissions, so retain a way to disable it and restore the previous network state.
- Install or enable service mode. The interface may call this Service Mode or Install Service. Windows generally requires administrator approval to install the service. A lit switch does not prove that the virtual interface and routes were created; check permissions and service state.
- Enable TUN in the application's settings or home screen. Names vary by release.
- Choose a supported stack in the core settings:
gvisor: a userspace stack that can be a useful compatibility starting point.system: uses the system stack; behavior and performance depend on the platform.mixed: combines stack implementations; verify support in your installed core.
- Check DNS handling. Configure the engine's DNS and interception rules, such as dns-hijack, when that is how your routing design resolves domains. DNS need not universally be intercepted to work, but IP connectivity with failing name resolution requires checking the actual resolver path.
Add a TUN entry under inbounds. The inherited example below contains the older inbound sniff option: it was deprecated in 1.11.0 and removed in 1.13.0. For a current release, remove that field and use the route action described below. This is a partial configuration, not a complete ready-to-run proxy:
{
"type": "tun",
"tag": "tun-in",
"interface_name": "singbox-tun",
"address": ["172.19.0.1/30", "fdfe:dcba:9876::1/126"],
"mtu": 9000,
"auto_route": true,
"strict_route": true,
"stack": "mixed",
"sniff": true
}
The corresponding route section needs an appropriate default outbound and interface selection:
{
"route": {
"auto_detect_interface": true,
"final": "proxy"
}
}
The outbound tagged proxy must actually exist in your full configuration. For releases using route actions, sniffing and DNS interception can be expressed in the route rules, for example:
{
"route": {
"auto_detect_interface": true,
"rules": [
{ "action": "sniff" },
{ "protocol": "dns", "action": "hijack-dns" }
],
"final": "proxy"
}
}
Configure the DNS module and servers for your release as well. Merge the rules into your existing route section rather than adding a duplicate section. Consult the listen-field migration notes, route actions and DNS reference, then validate your complete configuration with the installed version before replacing a working setup.
On Linux, auto_route changes routes and needs appropriate privileges. A trusted service can run with the necessary capabilities; the original command grants network capabilities to the binary:
sudo setcap cap_net_admin,cap_net_raw+eip $(which sing-box)
Use it only for the trusted binary at the verified path. Capabilities are security-relevant and may be lost when the executable is replaced during an upgrade. A managed service configuration is preferable to granting unrelated processes broad privileges.
Client-side TUN cannot supply UDP forwarding that the selected outbound or server lacks.
- QUIC-based options such as Hysteria2 and TUIC can carry UDP, but the server, firewall and network must allow the transport. They are candidates to measure, not a guarantee of the best game performance.
- VLESS, VMess and Trojan deployments may also support UDP. The actual implementation, transport and configuration determine how it is carried. UDP over a TCP stream can suffer head-of-line blocking. A server inbound restricted to
"network": "tcp"does not provide the required UDP path.
Configure client and server together. The related self-hosted Clash Verge server guide uses sing-box with Hysteria2; confirm UDP forwarding and reachability in your deployment rather than relying only on the protocol's name.
- Interface creation: look for the Clash/sing-box adapter on Windows, or use
ip addron Linux. If absent, return to service mode and permissions. - DNS: compare
nslookup example.comandcurl -v https://example.com. If IP access works but names fail, inspect resolver selection and DNS routing/interception. - UDP rules: check whether UDP is rejected or sent to direct instead of the intended proxy outbound.
- Server support: confirm UDP at the server and transport. A known working Hysteria2/TUIC endpoint can help isolate the path, subject to its access rules.
- MTU: oversized packets can produce partial connectivity. Reduce the example's 9000 toward 1500 as an initial comparison; tunnel overhead can require a lower value. 1500 is not a universal guarantee.
- Security software and firewall: inspect adapter or route blocking and test a narrow, reversible exception where appropriate. Keep the firewall and unrelated protections enabled; restore any diagnostic exception afterward.
Change one item at a time. Disable TUN to restore access if needed before investigating further.
TUN redirects traffic; it does not itself accelerate the connection. The route is:
你的本地网络 → 你的 VPS → 游戏服务器
Measure both client-to-VPS and VPS-to-game-server segments, along with loss and jitter:
- A VPS route can help if the complete path is better than your direct connection. For example, a direct path to Japan may detour while another route avoids it. SoftBank, IIJ or CN2 labels alone do not prove improvement; CN2-related claims particularly depend on the relevant mainland-China path.
- A worse VPS path adds another hop and may increase latency or loss.
Compare ping and mtr on the direct and VPS routes, then verify the actual game or voice session. ICMP filtering can distort diagnostics, so a ping alone is not proof of application performance. Some competitive games restrict proxies or VPNs and may require verification or suspend accounts; check the game's terms before use.
Enable the service and permissions, make DNS match your routing design, and verify end-to-end UDP support. Then measure the route. A working TUN interface solves traffic capture; the server path and application determine whether the result is useful.