Aug 19, 2026 · Client Features · About 10 minutes

v2rayN TUN Mode: How It Works and How to Enable It

Learn how virtual network adapters work, how TUN differs from system proxy settings, and how to enable TUN in v2rayN, grant permissions, and troubleshoot connection issues.

At a glance

TUN can route traffic from apps that ignore system proxy settings, but enabling TUN does not mean every connection will use the proxy. This guide focuses on v2rayN for Windows and explains how virtual adapters, administrator permissions, DNS, and routing rules work together. It also covers preflight checks, connection tests, and recovery steps. Permission requirements differ on other desktop systems, so do not apply Windows elevation steps elsewhere.

1. TUN vs. System Proxy: What Each One Captures

In short, a browser working through the system proxy does not prove that other apps will use it. A system proxy setting provides apps with a proxy address, but whether an app honors that setting depends on its implementation. TUN creates a virtual Layer 3 network interface. The operating system routes matching IP packets through it, and rules then determine whether they go direct, through the proxy, or are blocked.

ComparisonSystem proxyTUN mode
Traffic capture pointApps read the proxy settings and connect to a local proxy portSystem routes send packets to the virtual network adapter
App supportApps generally need to support and follow proxy settingsApps generally need no separate proxy configuration
UDP trafficCannot be fully handled by an HTTP system proxy aloneCan be captured, but still depends on kernel, protocol, and server support
PermissionsUsually requires no permission to create a network adapterUsually requires elevated permissions or a preconfigured service
Traffic exitDetermined by app settings and client rulesDetermined by capture scope and client rules

“Full traffic capture” describes which connections enter the client; “global proxy” describes how those connections exit. They are not the same setting. Even with TUN running, LAN addresses, local domains, or rule-matched destinations may still go direct. Conversely, choosing global proxy routing cannot process connections that never reach the client.

TUN does not increase server bandwidth or make UDP connections work when the server does not support them. If only your browser needs a proxy, the system proxy is usually easier to configure and roll back. Consider TUN when an app bypasses the system proxy.

2. How a Virtual Network Adapter Routes Traffic to the Proxy Kernel

App sends a request System selects a route TUN adapter captures traffic Routing rules are matched Direct or proxied

TUN receives IP packets, not complete URLs from the browser. The client matches rules using the destination address, any available domain information, and DNS results. Whether domain information is preserved depends on DNS handling, sniffing, and how the app resolves names. Do not assume every connection can be mapped back to a domain.

v2rayN provides the configuration and management interface; the bundled core handles connections. TUN traffic processing and the proxy core used by a node may run in separate processes, and implementation details vary by client version. When troubleshooting, check both TUN startup logs and proxy outbound logs—not just the toggle in the interface.

3. Before You Enable TUN: Check Permissions, Ports, and Network Software

First, make sure system proxy mode works, then switch to TUN. This separates an unavailable node from a virtual adapter capture failure. After importing your subscription, select a working server and load a web page. A latency reading alone does not confirm that DNS, TLS connections, and page resources are working.

53
Port used for standard DNS queries
10808
Example local proxy port; check your client settings
127.0.0.1
Local loopback address, not a remote server

Under “Settings” → “Parameter Settings,” check the local listening address and port. This guide uses 127.0.0.1:10808 as an example; you do not need to change your existing configuration to match it. TUN does not make every app connect to port 10808. The port is useful here to distinguish the existing local proxy entry point from the virtual adapter entry point.

  1. Save your current settings: Note the selected server, routing mode, local ports, and DNS options. Keep configuration backups in a secure location, and redact subscription URLs and credentials before sharing screenshots.
  2. Check permission requirements: On Windows, creating an interface and changing routes typically requires administrator privileges. If the device is managed by an organization, get approval first; do not bypass endpoint security policies.
  3. Avoid competing traffic capture: For testing, exit other VPNs or proxy apps that use virtual adapters so two programs do not modify the default route at once. Do not uninstall company network components.
  4. Check the installation: Use an installer that matches your operating system and processor architecture, and keep the bundled core files. If the logs report missing files, repair the installation instead of repeatedly toggling TUN.

4. Enable v2rayN TUN on Windows

Control locations can vary between versions; a common entry is “Enable TUN” at the bottom of the main window. If the interface offers a service mode, a preinstalled service may handle permissions. If that is not configured, launch the app as an administrator for testing. Repeated permission prompts do not mean access was granted.

  1. Exit and relaunch as administrator: Quit v2rayN from the system tray, then right-click the app or shortcut and choose “Run as administrator.” Approve the system prompt. Closing the main window may only minimize the app to the tray.
  2. Keep the verified server selected: Use the node that worked in system proxy mode. Do not change the protocol, subscription, and routing rules at the same time.
  3. Keep the routing policy fixed: Under “Settings” → “Routing Settings,” review the current rules. Keep the working policy during testing and confirm whether LAN traffic needs to go direct.
  4. Isolate the system proxy entry point: Set the system proxy to “Clear system proxy,” then select “Enable TUN.” If the browser works, this makes it easier to tell whether traffic used TUN or the previous system proxy.
  5. Check the startup logs: Look for errors such as insufficient permissions, failed adapter creation, address conflicts, or ports already in use. Fix the first clear error before trying again; do not keep toggling the setting.
  6. Test and keep a rollback path: Visit the same test site, then try an app that did not use the system proxy before. If it fails, turn off TUN, restore the previous system proxy settings, and confirm the basic connection still works.

Do not leave the system firewall disabled as a way to troubleshoot TUN. If security software blocks a bundled process, verify its path and source and check your organization’s policies before allowing only the network access it needs.

5. DNS and Routing: What to Check After TUN Starts

DNS queries and application connections are related but separate paths. A successful lookup does not prove that the app connection uses the proxy, and a connection entering TUN does not mean its domain was resolved remotely. Configure DNS for your actual routing needs rather than replacing it with a single resolver address across the board.

App traffic entry point

System proxy
Clear this when testing TUN
TUN status
Enable it and check the startup logs
Local port
10808 is only an example in this guide
Routing policy
Keep the verified routing rules

Change one setting at a time so a node issue is not mistaken for an adapter issue.

DNS resolution path

Standard queries
Usually use UDP or TCP port 53
Encrypted DNS
Check its actual connection path separately
Internal domains
Keep an accessible internal resolver
IPv6
Check the address, route, and capture scope

Make sure the DNS capture options match the active core configuration. Do not paste fields from another core without checking them.

When encrypted DNS is enabled in a browser, DNS queries may look like ordinary encrypted traffic. Checking port 53 alone will not tell you where resolution happens. If company domains rely on internal DNS, sending every query to a public resolver may break them. Preserve the resolution path for internal domains and confirm that the resolver itself can reach its destination through the expected exit.

6. How to Verify TUN Is Working

A proper test checks the interface, rule matches, and the app itself. A single public IP lookup shows only the result of that request; it does not prove that every process and destination uses the same exit. If the rules send the test site direct, seeing your local network’s public IP may be expected.

  1. Check the interface: In Windows Network Connections, look for the new virtual interface and use the logs to confirm it was created during this launch. Interface names vary by version, so do not rely on one fixed name.
  2. Check routes: Run the read-only commands below in Command Prompt to inspect IPv4 and IPv6 routes. TUN may capture traffic using more-specific routes rather than replacing the default route outright.
  3. Check connections: Run the target app and look in the client logs for its destination, matched rule, and outbound result. If there is no corresponding entry, check whether the app uses its own tunnel or is bound to another interface.
  4. Compare before and after: Keep the system proxy cleared and record the same app’s results with TUN on and off. Restore any settings you need after the comparison.
ipconfig /all
route print -4
route print -6

These commands only display network status; they do not change routes. Their output may include local addresses and internal network details, so do not share it publicly as-is. Even if the logs show a proxy outbound match, confirm that the request actually succeeded: a rule match and a remote connection are separate stages.

7. v2rayN TUN Troubleshooting FAQ

The internet stops working as soon as I enable TUN. Should I change DNS or switch nodes first?

Turn off TUN and restore the system proxy setup that worked before. If the original node still connects, check TUN startup logs, administrator permissions, and conflicts with other virtual adapters first. If system proxy mode also fails, troubleshoot the node and basic network connection. Do not change DNS, nodes, and routes all at once.

Why does enabling the switch not fix an insufficient permissions error?

Quit the app completely from the system tray, then relaunch it as an administrator and approve the permission prompt. If the device is managed by an organization, check whether creating a virtual adapter is allowed. For versions that use a service, confirm that the service is running. A checked box in the interface does not prove that permissions took effect.

Web pages load, but games or voice chat still cannot connect. Why?

Find the app’s connection in the logs and check whether it entered TUN, which rule matched, and whether the node and server support the relevant UDP traffic. A successful latency test usually does not verify this. If the app is bound to a specific adapter, check its own network settings too.

Why can’t I access the company network or find my printer after enabling TUN?

Check whether LAN destinations are set to go direct and whether internal domains still use an accessible internal DNS server. Test with a known internal IP address to distinguish a DNS issue from a routing issue. Do not force the entire internal address range through the proxy server. For company networks, have an administrator confirm the permitted changes.

How do I restore the network if closing the window did not help?

Closing the window may only hide the app in the system tray. Turn off TUN in the main interface, clear the system proxy, then quit from the tray and check whether the interface and routes have been restored. If the app crashed, reopen it and exit normally. If anything remains, restart the system; do not delete unfamiliar network adapters.

For a reliable setup, verify the node first, then the TUN entry point, and finally DNS and routing. Change one part at a time and keep a way to restore the previous state. This makes it easier to distinguish capture, DNS, and outbound connection failures—and avoids unnecessary reinstalls or guesswork with routing rules.

Download V2Ray