At a glance

If your browser uses the proxy but desktop tools or command-line apps still connect directly, try comparing behavior with TUN mode in v2rayN for Windows. First, distinguish which connections are captured from how captured traffic is routed, then follow the steps to enable, verify, troubleshoot, and revert the setting.

How v2rayN TUN Mode Works: Routing Connections Through a Virtual Adapter

A system proxy is a setting that applications can choose to use. Apps that read it send requests to a local proxy, but programs with their own network settings, apps that only read environment variables, and software that connects directly may ignore it. TUN works like an additional network adapter in the operating system, so apps don't need to specify a proxy address. They send traffic as usual, and the operating system's routes determine which adapter handles it.

App connectionSystem routingVirtual adapterRule matchingOutbound selection

Once traffic enters the virtual adapter, the component handling TUN processes each connection using the active configuration. There are two distinct kinds of routing: system routes determine whether traffic enters the virtual adapter, while client routing rules determine whether captured traffic goes direct, through a proxy, or is blocked. For example, a system route can exclude a local printer's address, or a rule can send its traffic direct after it enters TUN. Either approach may keep printing available, but the logs will look different.

v2rayN System Proxy vs. TUN: Settings, Ports, and How to Test

The steps below use the Windows version of v2rayN 7.x as a reference; menu locations and labels may vary between minor releases. Check “Settings” → “Parameter Settings” and the startup log for the local listening ports. The example uses 10808 to distinguish the local proxy port from the DNS query port and the destination port used for web traffic.

10808
Example local proxy listening port
53
Common port for traditional DNS queries
443
Common destination port for HTTPS

System proxy

Where to find it
The “System proxy” option at the bottom of the main window
Traffic entry point
The app connects directly to the local proxy listening address
What to test
A browser confirmed to use the system proxy settings
Common blind spot
A proxy configured in the app itself or command-line environment variables

Use the system proxy when only a few apps, such as a browser, need a proxy.

TUN mode

Where to find it
The “Enable Tun” switch at the bottom of the main window
Traffic entry point
IP traffic routed to the virtual adapter by the operating system
What to test
The same app, confirmed not to use an application proxy
Common blind spot
The virtual adapter is up, but the destination follows another route or matches a direct rule

If an app ignores the system proxy, compare the same request with TUN enabled.

How to test: Change only TUN between runs

First clear the system proxy. Keep the node, routing configuration, and test destination unchanged, then make a new connection from the same app with TUN off and on. Don't compare a browser working with the system proxy enabled against another app working with TUN enabled; that won't show which setting made the difference.

How to Enable TUN in v2rayN for Windows

  1. Confirm the node works first. Leave TUN off, select the node you want to test, and use a known-working system proxy setup to visit a test site. If this fails, check the node connection errors in the main window log first; changing how traffic is captured won't fix a broken node.
  2. Note your current settings and establish a baseline. Record the system proxy option, selected node, and routing configuration. Choose “Clear system proxy,” and make sure the test app has no separate proxy configured. Have it request the same destination once and note the result and time. If your device is managed by an organization, don't override its proxy settings.
  3. Turn on TUN. Enable “Enable Tun” at the bottom of the main window. If you see a permissions error, exit v2rayN, right-click it, choose “Run as administrator,” and try again. For the first test, leave the default TUN settings unchanged; don't adjust DNS, routes, or adapter settings at the same time.
  4. Verify startup, then test again. Check the logs at the bottom for errors creating the virtual adapter, installing routes, or starting the core. Have the original test app make a new connection; if it reuses an existing one, close and reopen the app first. Compare the request time with the logs to see whether the connection entered the processing chain and whether it went direct or through a proxy.

TUN Has No Effect? Troubleshoot the Adapter, DNS, and Ports

First identify which layer is failing. If the adapter wasn't created, check permissions and startup logs. If it was created but one app still fails, check how its destination is routed. You can run these three checks in Windows PowerShell. The examples use example.com; replace it with the affected domain and run each check with TUN both off and on.

Get-NetAdapter
Resolve-DnsName example.com
Test-NetConnection example.com -Port 443

v2rayN TUN FAQ and How to Restore Your Settings

The switch turns itself off as soon as I enable it. What should I check?

Start with the first startup error in the logs at the bottom. If it reports insufficient permissions, restart v2rayN as administrator and try again. If it says the adapter couldn't be created, note the error and, if your device allows it, exit other traffic-capture tools before trying once more. On a managed device, ask your administrator to check driver and permission policies.

My LAN printer disappeared after I enabled TUN. What should I do?

Turn TUN off first and test the printer at its usual local network address. If it works again, check whether the current configuration preserves a route to the printer's subnet. If you can connect by IP but automatic discovery still fails, focus on local network discovery traffic rather than routing the entire LAN through a proxy.

Webpages load, but why won't in-game voice chat connect?

First confirm which connection type the voice feature uses, then check the client logs around the time you retry. If you see a UDP connection enter the processing chain but no successful outbound connection, check whether the current node and outbound support UDP. If there's no matching connection at all, check whether the game reused an existing session or whether its traffic took a route that bypasses TUN. A successful webpage test doesn't verify voice chat.

How do I restore my original network setup if I no longer want to use TUN?

Turn off “Enable Tun,” then restore the “System proxy” option you noted before testing. Close and reopen affected apps, then test a commonly used website and a local network service. If either still fails, exit v2rayN normally and check Windows “Settings” → “Network & Internet” → “Proxy” to see whether the manual proxy still points to a local address that is no longer listening.