A lot of people think they're done once v2rayNG is installed, the subscription is imported, and they're connected to a node. A few days later, though, they notice local video sites are laggy, data usage is climbing fast, and some local apps won't even open. Nearly all of these problems trace back to the same root cause: routing rules aren't configured right. This article explains, in plain terms, what routing rules actually are, what each of v2rayNG's built-in modes is best for, and how to write your own custom rules. Note that the built-in "Bypass Mainland" preset is specifically built for mainland China — if you're elsewhere, the same idea still applies, you'll just want to swap in your own country's rules (see the custom rules section below).

What Problem Do Routing Rules Actually Solve?

A V2Ray-style client works by opening a local proxy port on your device — network requests from your system or browser hit this port first, and it decides whether to "connect directly to the destination" or "forward it to the remote node." Without any logic to decide, the simplest approach is to forward everything, which is Global mode. But local sites are already fast to reach from a local server, so routing them through a server abroad just adds latency and burns through your node's bandwidth for nothing. Routing rules solve this by automatically deciding, based on domain or IP location, which path each request should take — this is called "split tunneling."

Which of the 3 Built-In Modes Should You Use?

ModeBehaviorBest For
Global ProxyAll traffic goes through the node, no exceptionsAccessing services that require an IP from the node's region (e.g. region-locked content)
Bypass LANExcludes only local network addresses (printers, router admin pages, etc.) from the proxyRarely used alone, usually combined with other rules
Bypass LAN and MainlandLAN addresses and local domains/IPs connect directly, everything else goes through the nodeRecommended for daily use — balances speed and access, what most people should use long-term

For the vast majority of people, Bypass LAN and Mainland is the best choice — set it under the "Routing" menu in the top right of v2rayNG's main screen. Once selected, local sites connect directly and foreign sites go through the proxy, with both running at normal speed.

Why Does It Still Feel Slow With "Bypass Mainland" Enabled? This is usually because the client's region-detection rule database is outdated, or the site you're visiting uses a CDN whose actual IP range falls outside the expected list. Try updating the "geo data files" in the client settings — this resolves most split-tunneling accuracy issues.

A Hands-On Guide to Custom Split-Tunneling Rules

If the built-in modes don't quite fit your needs (say, you want a specific site to always use the proxy, or a specific app to always connect directly), you can add your own rules:

  1. Open v2rayNG, tap the menu in the top right, and choose "Routing Settings."
  2. You'll see two editable lists, "Proxy Domains" and "Direct Domains" — enter one domain or IP range per line.
  3. Domain rules support three prefixes: domain: matches the domain and all its subdomains, full: matches the exact domain only, and keyword: matches any domain containing that keyword.
  4. IP rules take a network range directly — geoip:cn represents the entire mainland China IP database (swap in your own country's code if that doesn't apply to you, e.g. geoip:jp, geoip:kr, geoip:de), or you can enter a specific CIDR block like 192.168.1.0/24.
  5. Save your changes and reconnect to the node for the new rules to take effect.

A Few Common Rule Examples

Common Pitfalls Custom rules usually take priority over the built-in modes, so a mistake (like mixing up full: and domain:, or an incorrectly formatted IP range) can make a site completely inaccessible. Change one rule at a time and test right after saving, so you can pinpoint problems quickly.

Troubleshooting When a Rule Doesn't Take Effect

If nothing changes after editing a rule, check in order: did you reconnect after saving (some clients only load new rules after you disconnect and reconnect); is the rule's syntax correct (an extra space or missing colon will cause that line to be ignored); is another higher-priority rule overriding it. If you're still stuck, check the more detailed steps in the full troubleshooting guide, or reset to the default "Bypass LAN and Mainland" mode to confirm your basic connection works before adding custom rules one at a time.

Routing rules might seem like a lot of concepts at first, but once you've configured them once, the logic turns out to be pretty simple: the default mode covers 90% of everyday scenarios, and custom rules just patch in the remaining edge cases. You don't need an elaborate setup — just enough to cover what you actually need.

Don't Have v2rayNG Yet?
Official installer, supports every routing setting covered in this guide
Get the Download

← Back to Blog