Some software (games, some desktop programs, command line tools) do not recognize the system agent. Even if you enable v2rayN, they will still connect directly. Tun mode is prepared for situations like this - it takes over at the system level all Network traffic to achieve a truly global proxy.
1What is the difference between Tun mode and system proxy?
A common "system agent" is Application layer: It hangs a proxy address in the system, and relies on each software to "consciously" read this setting. Browsers generally recognize it, but many programs do not.
Tun mode is network layer: v2rayN virtualizes a network card, directs the entire computer's traffic to this network card and then forwards it out. In this way, regardless of whether the software recognizes the proxy or not, the traffic will be taken over, so it is also called "virtual network card/global mode".
2Steps to enable Tun mode
- First add the node normally, Select an available node(Tun is also forwarded based on the current node).
- In the status bar at the bottom of the main interface, click "Tun Mode" is checked.
- When starting up for the first time, v2rayN requires Administrator rights To create a virtual network card, the UAC confirmation window will pop up, click "Yes". If it doesn't play, right click
v2rayN.exeSelect "Run as administrator" and then open it again. - After checking, wait a few seconds and there will be an additional block called
wintunvirtual network card, this is successful.
Why do I need administrator rights? Creating a virtual network card and modifying the system routing table are protected operations and cannot be done with normal permissions. This is also why the Tun switch sometimes fails to respond when clicked - most likely because v2rayN is not started as an administrator.
3It is recommended to turn off the system agent after opening Tun.
Tun has taken over all the traffic. If the "system proxy" is also turned on at the same time, it is easy to cause conflicts in which the traffic goes around twice and the web page cannot be opened. The general combination is: Turn on Tun mode → switch the system agent back to "Clear System Agent". Just choose one of the two.
4When to use it and when not to use it
- What to use: When playing games that require a proxy, using Steam/Telegram desktop, command line tools (git, pip, docker) to use a proxy, or a certain software does not recognize the system proxy.
- No need to: Just for daily browsing on the Internet, it is enough to use "automatically configure system proxy + bypass mainland routing", which is lighter and less prone to problems.
It works better with routing: Routing rules are also followed in Tun mode. Remember to set the bottom column routing to "Bypass Mainland" so that domestic traffic is still directly connected and online banking and domestic videos will not be bypassed by the proxy due to global takeover. See details Routing diversion tutorial.