Configuration · 7 min read

How to turn on TUN mode

What system proxy and TUN each handle, when TUN is required, what breaks when both are on, and the extra permission Android asks for in TUN mode.

FlClash captures traffic in two ways: by setting the system proxy, or by creating a virtual network adapter. The first is light, the second is thorough — choose wrong and you get "browser works, everything else doesn't".

AspectSystem proxyTUN mode
CoverageOnly apps that read the OS proxyAll IP traffic, including apps that ignore proxies
PrivilegesNormal userNeeds adapter creation (admin / root)
Typical conflictsRarely anyFights other VPNs, Docker and VMs over routes
Best forBrowser-first use, selective proxyingGlobal capture, games and CLI tools

Does FlClash have TUN mode? Yes, on all four platforms. On Android it is labelled virtual adapter, on desktop it is simply TUN — different switches, same idea: create a virtual adapter and take over all IP traffic. The difference from system proxy comes first, then how to turn it on.

How to turn TUN mode on

1
Turn off the system proxy first

Enabling both loops traffic: the system proxy hands it to a local port, TUN captures that traffic back into the core. At best it is slow; at worst nothing connects.

2
Enable the virtual adapter and authorise it

On desktop, flip the switch on the dashboard and grant the network configuration prompt; on Android it appears as a VPN permission dialog.

3
Verify it actually captured traffic

Test with something that ignores the system proxy: curl a foreign host in a terminal, or look for non-browser processes on the Connections page.

DNS settings

  • fake-ip is the fastest and the right default; a few programs (some games, P2P) dislike fake addresses — switch to redir-host for those.
  • Put a domestically reachable resolver in nameserver and an overseas one in fallback, and configure fallback-filter so domestic domains are not resolved abroad.
  • When poisoning is severe, route DNS resolution itself through the proxy (mihomo supports DoH / DoT).
No internet at all after enabling TUN

Nine times out of ten it is a route conflict: another VPN client, a Docker bridge, or a VM network grabbing the default route. Disable other virtual adapters first, then exclude the conflicting subnet.

Proxy port: CLI tools and other devices

System proxy and TUN cover apps on this machine. Two cases fall outside both: command-line tools, and other devices on your LAN. Use the HTTP and SOCKS mixed port the client exposes and point them at this host.

Take the port from the app settings; the snippet below is only the usual shape
# 命令行临时走代理(端口以设置页为准)
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890

# 局域网设备:把 127.0.0.1 换成这台机器的内网 IP
curl -x http://192.168.1.20:7890 https://example.com
Think before allowing LAN connections

Once enabled, anyone on the same network can use your exit. Fine at home, not on office or public Wi-Fi — that is an open proxy on the LAN.

Differences on Android

Android has no system proxy concept; traffic can only be captured through VpnService — the VPN permission dialog you see. So Android is global by nature, and per-app routing is configured separately.

  • Per-app proxy: let selected apps bypass or force the proxy — useful for banking apps.
  • LAN access: with TUN on, add your private ranges to direct rules to reach NAS and other local devices.
No subscription yet?

FlClash is only a client and ships without nodes. With a plan: pay, copy the link, paste it in — three minutes to online.

Buy a plan
Still stuck?

Attach logs and system info when you open a GitHub issue — far more likely to get reproduced than a chat message.

Open an issue