If your browser works through the system proxy but desktop apps that ignore proxy settings connect directly, TUN can capture their traffic. Using v2rayN on Windows as an example, this guide covers how to test TUN separately, choose a network stack, and distinguish permission, routing, DNS, and proxy outbound issues.
System Proxy vs. TUN: Different Ways to Capture Traffic
A system proxy provides apps with a proxy address. Apps that read Windows proxy settings connect through the configured local proxy port; apps using their own networking library, separate proxy settings, or direct sockets may not. A working browser only confirms that its own connection path works—it does not mean other apps are using the proxy.
TUN is a Layer 3 virtual network interface that handles IP packets. Windows selects an interface based on the destination address and routing table; only packets routed to the virtual adapter are handled by TUN. The core then uses the destination address, available domain information, and routing rules to choose a proxy, a direct connection, or a block. The virtual adapter receives traffic; it is not a proxy protocol and does not determine whether the remote connection succeeds.
- Traffic coverage: Determined by system routes and exclusions. LAN, loopback, specific interfaces, and IPv6 traffic may not follow the same path as ordinary IPv4 internet traffic.
- Outbound policy: Determined by the core configuration generated by the client. After TUN is enabled, connections matching direct rules still connect directly. TUN does not mean that all traffic goes through the proxy.
- Connection loops: The core's own outbound connections to nodes must avoid being captured by TUN again. When multiple virtual adapters or manual routes are in use, first check whether another component has changed the destination route.
How to Enable TUN on Windows
- Establish a baseline. Leave TUN off, select the current node, and use the system proxy to test a known-accessible HTTPS page. Note the node, destination domain, and routing mode. If this test already fails, check the node connection logs first; don't change the node, stack, and DNS all at once.
- Run as administrator. Exit v2rayN completely, including its system tray process. Then right-click the program, select “Run as administrator,” and approve the Windows permission prompt. Creating a virtual interface and configuring system routes usually require elevated privileges; closing the main window alone may not stop the old process.
- Configure and enable TUN. Find the “Enable TUN” switch on the main screen. To check the stack type, open “Settings” → “Parameter Settings” → the TUN options in versions that provide this path, and keep the default value initially. If the interface or options differ, follow the settings available in your current version and core.
- Test the two paths separately. During testing, set v2rayN's system proxy to “Clear” and make sure the app itself has no manually configured local proxy, then enable TUN. Check the startup log, then initiate a new connection from the target app. Restart the app if needed to rule out interference from existing connections.
- Keep a way back. If the network stops working, turn off TUN first and check whether normal connectivity returns, then restore the previous system proxy settings if needed. Don't start by deleting the virtual adapter or resetting the entire Windows network.
What to Check: New Connections from the Target App
A listening local proxy port only confirms that the proxy entry point is available. To test TUN, disable explicit proxies and reopen the target app. Compare the connection time with the core logs to confirm whether the request reached the core and which outbound route it selected.
TUN Stack Types: When to Use system, gvisor, or mixed
The stack type controls how TUN handles TCP, UDP, and other traffic; it does not change a VMess node to VLESS or alter server transport settings. The comparison below describes these options as provided by sing-box. For other cores, check the interface and startup logs to see whether the same settings exist and are supported in your build.
Two Basic Stack Types
system
- How it works
- Uses the operating system's network stack to handle transport-layer traffic
- Starting point
- Keep it if it is the default in your current build
- What to test
- Web page loads, persistent connections, and access to local services
Confirm the virtual adapter and system routes are in place before changing stacks.
gvisor
- How it works
- Uses a user-space network stack
- Recommended use
- Compare compatibility with a specific app
- What to test
- TCP and UDP behavior for the same destination, plus resource usage
Test with the same node and app to see whether it helps.
If the interface offers mixed, sing-box uses system for TCP and gvisor for UDP in this mode. If web pages load but voice or other UDP-dependent features fail, first confirm that the outbound configuration supports that traffic, then compare the available stacks. Switching stacks alone cannot add UDP forwarding if the node or proxy outbound does not support it.
No Internet After Enabling TUN? Check the Adapter, Routes, and DNS
In PowerShell, start with read-only commands to inspect interfaces and routes, then query a public domain. Record the output before and after enabling TUN. The domain lookup shows how Windows resolves names; apps that use their own resolver may get different results.
Get-NetAdapter -IncludeHidden
Get-NetRoute -AddressFamily IPv4
Get-NetRoute -AddressFamily IPv6
Resolve-DnsName example.com
- No virtual adapter: Check the earliest error in the startup log and determine whether it points to insufficient permissions, adapter creation failure, or a core configuration that could not be loaded. If the log says the core has exited, fix the startup issue first; there's no need to change DNS yet.
- Adapter present, but traffic isn't reaching it: Check the route for the destination address, not just the default route. Windows prefers the route with the longest matching prefix; even if the default route looks correct, a more specific subnet route may send traffic through another interface.
- Domain lookup fails: Check whether the app uses its own encrypted DNS, then review the client's DNS settings and logs. Browser cache can mask DNS problems. Don't treat opening an HTTPS site by IP address as an equivalent test—the certificate check and server name may differ.
- Traffic reaches TUN, but outbound connections fail: Check the selected outbound, destination port, and where the timeout occurs in the logs. If the same destination works through the system proxy but fails through TUN, compare the rules matched and DNS results on both paths before assuming the node is unavailable.
Virtual Adapter Conflicts and App Connection Issues
TUN breaks access to your company's internal network?
Turn off TUN first and confirm that the original access path works again. Check whether the internal destination is a private domain or a fixed subnet, and verify DNS results and destination routes separately. A direct route selected by the core does not guarantee that the connection will use the original corporate interface. On managed devices, ask your administrator how to configure routes and DNS to coexist; don't remove a corporate adapter or change security policies yourself.
Why do connections become intermittent when two virtual adapters are enabled?
In a personal environment where disabling them is allowed, leave only one traffic-capture component enabled at a time, then compare access to the same destination and the routing output. If each works alone but they fail together, check for overlapping destination subnets, interface priority, and DNS settings. Change one variable at a time to identify the source of the conflict.
Browser works, but voice calls don't connect. What should I check first?
First confirm whether the affected app uses UDP and check the core logs for a new connection. If it selected a proxy outbound, verify that the outbound supports UDP. If there is no log entry, check the app's custom proxy settings and the route to the destination. Once you narrow down the issue, try another stack; don't change the stack, node, and routing rules all at once.
TUN is off, so why won't my usual websites load?
In Windows, open “Settings” → “Network & Internet” → “Proxy” and make sure the manual proxy isn't pointing to a local port that is no longer listening. Then exit the client, run the domain lookup again, and compare the routes with their state before testing. If only one app is still affected, restart it first to rule out stale connections and app cache.