How to Enable TUN Mode in v2rayN: Virtual Network Adapter Setup and Traffic Routing

System proxy settings only apply to apps that honor them. TUN mode routes traffic through a virtual network adapter. Learn how they differ, why administrator access is needed, how to enable TUN, and how to troubleshoot conflicts.

At a glance

This guide uses v2rayN on Windows desktop. It’s for cases where your browser can connect, but command-line tools or other apps can’t use the proxy. First verify your node, then enable TUN as an administrator. Check the network adapter, routes, and connection logs to confirm traffic is being captured. If you lose connectivity, roll back in a set order instead of changing your node, DNS, and routing rules all at once.

System Proxy vs. TUN: Capturing Traffic Doesn’t Mean Proxying Everything

A system proxy is a proxy configuration provided by the operating system to apps. Browsers usually use it, but some command-line tools, games, and background services have their own network settings and may ignore it. TUN creates a layer 3 virtual network interface and uses routing to send eligible IP packets to the proxy core. Apps don’t need built-in support for HTTP or SOCKS proxies.

App sends a request System selects a route TUN adapter receives traffic Rules determine routing Direct or proxied

“All traffic” describes what TUN aims to capture; it doesn’t mean every packet will reach a proxy server. LAN exclusions, interface binding, IPv6 settings, and certain system traffic all affect coverage. Even traffic that enters TUN can be routed directly, proxied, or blocked by rules. Enabling TUN also doesn’t automatically change a “bypass LAN” routing setup into global proxying.

FeatureSystem ProxyTUN Mode
Traffic enters atApps read proxy settingsSystem routes and virtual adapter
Typical traffic coveredBrowsers and other apps that honor the settingsTCP and UDP traffic routed through the interface
Windows permissionsChanging the current user’s proxy usually doesn’t require elevationUsually requires administrator privileges
Changes routing rules?No automatic changesNo automatic changes
Where to troubleshootProxy address and local listening portNetwork adapter, routes, DNS, and core logs

Rule of thumb: Try TUN if only some apps bypass the proxy

If your browser and other target apps connect as expected, stick with the system proxy. If the browser works but apps that ignore system proxy settings fail, first check whether those apps support manual proxy configuration. Then decide whether TUN is the right option.

Before You Start: Record Current Settings and Verify Your Node

v2rayN provides the client interface; the core handles traffic forwarding. Using VMess or VLESS doesn’t by itself determine whether TUN is available. Your current client version must also include a compatible TUN backend and its required components. Some versions use sing-box for TUN. Don’t assume the “TUN” switch means all traffic is handled by a single Xray setting.

The steps below use common labels from recent Windows versions. Button locations and TUN options may vary between desktop releases. First, note your exact version under “Help” → “About,” then match the settings shown in your interface. If a field isn’t there, don’t copy an old screenshot or invent a core configuration.

  1. Back up your settings. Back up the current configuration folder, or note your subscription groups, active node, routing mode, and DNS settings. Backups may contain subscription URLs and credentials, so store them securely.
  2. Verify the connection first. Leave TUN off, select a working node, and open a real webpage using the system proxy. A normal latency reading isn’t enough—you need to confirm that an actual request succeeds.
  3. Note the local port. Open “Settings” → “Parameter Settings” and check the local listening port and protocol. This guide uses 127.0.0.1:10808 as an example. Use the value from your current configuration.
  4. Avoid competing traffic capture. Temporarily exit other VPNs, virtual adapter tools, and network accelerators. On a managed work device, check your organization’s requirements first. Don’t disable company network security services without authorization.
  5. Check the installation folder. Use the complete installer or fully extracted folder; don’t copy only the launcher. Make sure your account can write to the configuration and log folders.

Enable TUN on Windows: Steps and Settings

For the first run, change only how traffic is captured. Keep the working node and routing setup. Don’t import a new subscription, switch protocols, change DNS, and enable TUN all at once—or it’ll be hard to identify what caused a failure.

  1. Exit the client completely. Quit v2rayN from the system tray instead of just closing the main window. Confirm the old process has exited.
  2. Run it as administrator. Right-click the v2rayN launcher, select “Run as administrator,” and approve the Windows prompt. If the app doesn’t get elevated privileges, fix that first. Don’t keep clicking the TUN switch.
  3. Check the active node. Confirm the selected server and routing mode in the main window. A selected node doesn’t necessarily mean the connection has been verified.
  4. Clear the system proxy. From the main window or tray menu, open “System Proxy” and select “Clear System Proxy.” For the first test, use only one traffic-capture method to make problems easier to isolate. Clearing the system proxy does not stop the core.
  5. Enable TUN. Turn on “Enable TUN” in the main window. If prompted to elevate again or restart the core, follow the instructions. Then check the logs for permission, adapter creation, or configuration errors.
  6. Start with the default TUN settings. To check advanced options, open the TUN section under “Settings” → “Parameter Settings.” In some versions, it’s called “TUN Mode Settings.” If a field isn’t available, keep the current version’s default rather than copying settings from another release.

Baseline: Verify the system proxy

Run as
Current user
System Proxy
Automatically configure system proxy
Enable TUN
Off
Local address
127.0.0.1
Port example
10808 (example)

The port must match an actual HTTP or mixed inbound. The number alone doesn’t tell you which protocol it uses.

Goal: Test TUN on its own

Run as
Administrator
System Proxy
Clear system proxy
Enable TUN
On
Active node
Keep the baseline node
Routing mode
Keep the existing mode

The local proxy can keep listening on its port. TUN uses a virtual network adapter; you don’t need to change the system adapter’s port to 10808.

If Windows Firewall prompts you on the first launch, check the program path and network scope. Don’t disable the entire firewall just to make the switch turn on, and don’t change the local listening address to 0.0.0.0. Widening the listening address won’t fix virtual adapter permissions and could let other devices on your network access the local proxy.

Check That TUN Works: Adapter, Routes, and Real Requests

A switch that’s on only confirms the interface state changed. To verify TUN, check that the virtual interface exists, that routes changed, and that the target request reached the core. Run the commands below in Windows PowerShell before and after enabling TUN, then compare the results. Interface names depend on the version and configuration, so they may not match screenshots in this guide.

Get-NetAdapter -IncludeHidden |
  Select-Object Name, InterfaceDescription, Status

route print -4
route print -6

curl.exe --noproxy "*" -I --connect-timeout 10 https://example.com/

Also test one destination that should go direct and another that should use a proxy rule. A changed exit IP only confirms a change for that request; it doesn’t prove every app is covered. Test UDP with the app you actually need. A working webpage only confirms that HTTP request—it doesn’t verify UDP traffic used by games or voice apps.

Rule of thumb: Confirm success with at least two kinds of evidence

A virtual interface and route changes show that TUN is in place; connection logs show whether the expected rules were applied. Together, they’re more reliable than the switch, latency, or exit IP alone.

DNS, IPv6, and LAN Access: What TUN Covers

TUN can receive packets without DNS necessarily working as expected. System caches, browser Secure DNS, client DNS rules, and core-level DNS capture can all take different paths. If IP addresses work but domain names don’t, check the logs for resolution errors, then review the client’s DNS settings. Don’t immediately replace every DNS server with the same public resolver.

After changing DNS settings, run the command below if you think Windows is holding on to stale DNS records, then test again. This clears only the Windows DNS client cache. It won’t clear the browser’s cache or fix an incorrect upstream DNS server or routing rule.

ipconfig /flushdns

Common Problems: Troubleshoot the Right Layer

The TUN switch turns itself off. What should I do?

Check the core logs from the same time. If they show insufficient permissions or interface creation failed, exit and relaunch v2rayN as an administrator. If a component is missing, repair the installation with the full installer and keep your configuration. Don’t keep switching nodes; node settings usually can’t fix a local adapter creation failure.

TUN cuts off all internet access. Should I change DNS first?

Turn TUN off and restore the previous system proxy state. Confirm the basic connection still works, then exit other traffic-capture tools and enable TUN by itself. Check DNS if the logs show resolution timeouts. If the node connection times out, check node reachability, interface selection, and routing loops.

Websites load, but games still can’t connect?

Check whether the destination connection appears in the logs, then confirm that the node’s outbound and server support the UDP forwarding you need. TUN can receive UDP, but the server may not forward it. Game connection failures can also involve specific ports, regional restrictions, or app-specific policies; enabling global mode alone won’t identify the cause.

Can’t access printers or the company network after enabling TUN?

Note the actual IP address and subnet you can’t reach, then check whether traffic is mistakenly matching a proxy rule. Restore direct access to your personal LAN as needed. If the company network relies on a dedicated VPN, turn TUN off to test. Don’t stack two default routes or remove a corporate network adapter unless you know what it’s for.

If webpages load but image uploads, video, or large file transfers often stall, check the MTU. Record the current value first, and change only one setting if your version provides it—for example, temporarily change 1500 to 1400 and retry the same task. This is a troubleshooting test, not a universal best value. Restore the original value if it doesn’t help, and don’t mistake occasional network fluctuations for proof that the setting worked.

Turn TUN Off and Roll Back: Restore the Original Traffic Path

When you no longer need TUN, turn off “Enable TUN” first and wait for the core to shut down or switch over. Then restore the system proxy state you need. Closing the main window alone may leave the tray process running, so it doesn’t stop traffic capture.

  1. After turning TUN off, check the adapter status and routing table again. The virtual adapter can remain, but incorrect capture routes should no longer be present.
  2. To keep using the browser proxy, select “Automatically configure system proxy” under “System Proxy.” To connect directly, select “Clear System Proxy.”
  3. If internet access stops after the client exits unexpectedly, restart the same client and turn TUN off normally. Go to Windows “Settings” → “Network & Internet” → “Proxy” and check for a manual proxy pointing to a port that’s no longer listening.
  4. If access still hasn’t returned, save the logs and restart Windows, then check for other VPN or virtual adapter software. Don’t jump straight to a network reset or bulk adapter removal; these can affect static IP settings, corporate networks, and remote management.

TUN controls how app traffic reaches the core; subscriptions provide available nodes; routing rules decide whether traffic goes direct or through a proxy; DNS resolves domain names. Check each layer separately to tell the difference between traffic not being captured, incorrect routing, and an unavailable node. For more on the basics, start with the usage guide. For protocol and transport settings, see the technical reference.

Download v2rayN Choose a platform and installer