中文
Home › Guides › What TUN mode is and how it differs from a system proxy

What TUN mode is and how it differs from a system proxy

A plain explanation of TUN mode, system proxy and transparent proxying, and when you need to turn TUN on.

ContentsLimits of the system proxyWhat TUN doesWhen to use itThings to watch forSummary

Limits of the system proxy

A "system proxy" tells the operating system to send web requests to an HTTP/SOCKS proxy on a local port. Programs that respect the setting (most browsers) use it, but some do not read it, including certain command-line tools, games and apps with their own network stack. Those connect directly.

What TUN does

TUN mode creates a virtual network adapter and changes routing so the whole device's traffic flows through it to the proxy program. Even programs that ignore the system proxy get captured.

When to use it

Things to watch for

  1. Permissions: desktop clients usually need administrator or root rights, or a service install. The OS may prompt the first time.
  2. Conflicts with other VPNs: several virtual adapters fight over routes, so turn others off first.
  3. DNS settings: TUN is usually paired with Fake-IP or a similar DNS scheme. Misconfiguration makes some sites fail.
  4. LAN access: if local devices become unreachable, check that routing rules send LAN addresses direct.

Summary

A system proxy is simple and compatible but incomplete. TUN covers more but depends on permissions and DNS settings. Reach for TUN when a program keeps connecting directly despite the proxy being on.

Apps mentioned

Clash Verge Rev

Tauri-based desktop client with the Mihomo core built in; supports subscription import, TUN and system proxy switching.

WindowsMacLinux
ClientOpen sourceFreeMihomoUnverified
★ 160,419 · v2.5.10Details

FlClash

Flutter multi-platform client; phone and desktop share one interface.

AndroidWindowsMacLinux
ClientOpen sourceFreeMihomoUnverified
★ 65,212 · v0.9.4Details

sing-box

Universal proxy platform: both a core and an official graphical client, configured mainly in JSON.

AndroidiPhone/iPadMacWindowsLinuxOpenWrtApple TV
ClientOpen sourceFreesing-boxUnverified
★ 40,260 · v1.14.4Details

Hiddify

Cross-platform client built on sing-box, aimed at working out of the box.

AndroidiPhone/iPadWindowsMacLinux
ClientOpen sourceFreesing-boxUnverified
★ 34,418 · v5.9.15Details

Keep reading