← Back to news

Clash Verge Routing Rules Configuration Guide

TutorialPublished: 2026-08-17 09:00Source: Clash VergeViews: 11,203
Clash Verge routing rules configuration

"Why are domestic sites slower when I turn on global proxy?" is the core problem routing rules solve. The default config already covers most cases, but truly shaping it into your own requires understanding how rules are written. This article starts from rule syntax and walks you to your first custom rule set.

Rule Structure: Match Condition + Action

Each Clash routing rule has two parts: a match condition and an action. The condition decides "which traffic applies", via domain suffix, keyword, regex or IP range; the action decides "where it goes", commonly proxy, direct or reject. Rules match top to bottom and stop on first hit, so order matters.

Routing rule structure
Each rule consists of a match condition and an action

For example, "DOMAIN-SUFFIX,google.com,proxy" routes all domains ending in google.com through the proxy. "DOMAIN-SUFFIX,taobao.com,direct" sends Taobao traffic directly, bypassing the node.

Three Match Types: Domain, IP, Geo

Domain matching is the most common, with three granularities in Clash Verge: suffix (DOMAIN-SUFFIX), keyword (DOMAIN-KEYWORD) and exact (DOMAIN). Suffix suits whole-site rules, keyword batches a category of services, and exact gives precise control.

IP and geo matching rely on the GeoIP database. The rule "GEOIP,CN,direct" sends all traffic resolving to Chinese IPs directly, without listing domestic domains one by one. This is especially useful for niche domestic sites not covered by rule sets.

An efficient rule set is often "precise domain rules + a GeoIP fallback": precise rules handle the sites you care about, while the GeoIP rule catches the rest. This gives precise control without mis-routing traffic due to missing rules.

Practical: A Developer's Rule Set

Say you're a developer who needs GitHub, npm and Docker Hub, while keeping the corporate intranet and local services direct. Write rules like this: add github.com, npmjs.org and docker.io to proxy; add internal ranges like 192.168.0.0/16 and 10.0.0.0/8 to direct; then use "GEOIP,CN,direct" and "MATCH,proxy" as fallbacks. Overseas dev sources go through the proxy, the intranet stays direct, and remaining overseas traffic proxies by default — three paths that never interfere.

Developer custom rule example
A custom rule set for the developer scenario

After writing rules, you can watch match hits in real time on the "Rules" page to verify they behave as expected. This "write and watch" approach helps beginners grasp the engine quickly.

Routing rules are among Clash Verge's most powerful capabilities, the line between "usable" and "great". The defaults are enough, but mastering custom rules lets you send every bit of traffic exactly where you want. To try it yourself, download Clash Verge and open the Rules page to write your first rule.

Comments (4)

C
Chris2026-08-17 09:30

Copied the developer rule set directly — GitHub and npm through the proxy, intranet direct. Noticeably faster.

V
Vera2026-08-17 12:10

"GEOIP,CN,direct" as a fallback is brilliant — no more listing niche domestic sites one by one.

K
Kai2026-08-17 15:00

"First hit wins" explains the ordering. My custom rules weren't working until I fixed the sequence.

W
Wren2026-08-17 17:45

The write-and-watch debugging is great — watching hits in real time made it click fast.