Skip to content

Routing and Rules

Nemu-x edited this page Jul 7, 2026 · 2 revisions

Routing & Rules

🌐 English · Русский · 中文

In Rule mode, ClashFest decides per-connection whether traffic goes through the proxy, direct, or is rejected — based on the rules in your config. The Routing tab lets you view and customise them.

How routing works

For each connection the engine walks the rule list top-to-bottom and applies the first match. A rule matches on things like:

  • DomainDOMAIN, DOMAIN-SUFFIX, DOMAIN-KEYWORD
  • IPIP-CIDR, GEOIP (country)
  • Rule sets / providers — big managed lists (RULE-SET, geosite, mrs)
  • Process / app, port, network (tcp/udp)

Each rule points at a policy: a proxy group, DIRECT, or REJECT.

The Routing hub

Open Routing to see:

  • Rules — the effective ordered list, with source badges (which came from your subscription vs. added manually).
  • Rule providers — the managed rule sets your config references, with on/off toggles.
  • Geo databases — GeoIP / Geosite data used by GEOIP / geosite rules, with a manual update action.

Editing rules

  • Manual rules you add are combined into the same ordered list and can be reordered, edited, or removed.
  • Subscription rules are toggle-only (on/off) — you don't edit them, because they get refreshed by the subscription. Disabling one survives subscription updates.
  • Changes are staged and applied with Save (with a dry-run preview).

Advanced rule types (logical AND/OR/NOT, process, port, protocol) are supported. Per-rule custom DNS is intentionally not offered — it's non-standard for Mihomo rules.

Related

Clone this wiki locally