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.
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.
- System routes determine what gets captured: IPv4 and IPv6 are routed separately. Seeing an IPv4 request enter TUN doesn't prove that the same app's IPv6 request follows the same path.
- Routing rules determine the outbound path: Enabling TUN doesn't automatically switch to global proxy mode. A destination can appear in TUN logs and still match a direct-connection rule.
- Test each connection type separately: Opening a webpage in a browser only verifies that request. Voice chat in games and other UDP traffic also depend on the processing chain and whether the selected outbound supports UDP.
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.
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
- 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.
- 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.
- 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.
- 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
- Use
Get-NetAdapterto compare the adapter list before and after switching. A new adapter confirms that the interface appeared, but doesn't prove that traffic to your destination is using it. - Use
Resolve-DnsNameto check DNS resolution from Windows. If Windows resolves the name but the app reports a DNS error, check whether the app uses its own encrypted DNS; it may follow a different resolution path. TcpTestSucceededinTest-NetConnectionindicates whether that TCP port test succeeded. It doesn't verify webpage content, the TLS handshake, or UDP, and it can't prove by itself that traffic went through a proxy. To determine how traffic was routed, also check the connection logs for the same destination.
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.