Skip to content

Routing and Rules

Nemu-x edited this page Jul 14, 2026 · 1 revision

Routing & Rules

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

In Rule mode, SlothClash decides per-connection whether traffic goes through the proxy, direct, or is rejected — based on the rules in your config.

How routing works

For each connection the core 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.

Viewing rules

The Rules view shows the effective, ordered list the core is using, plus the rule providers (managed rule sets your config references) and the Geo databases (GeoIP / Geosite) behind GEOIP / geosite rules.

Most subscriptions ship a complete, curated rule set — you usually don't need to touch anything.

Geo databases

GEOIP and geosite rules rely on data files. SlothClash keeps them and can refresh them; if a country rule looks wrong after a long time, update the geo data.

Advanced rule types

Mihomo's full rule grammar is supported, including logical rules (AND / OR / NOT), PROCESS-NAME, PROCESS-NAME-REGEX, port and protocol matches, and RULE-SET (.mrs) providers. MATCH is the catch-all final rule.

If your subscription pulls rule providers through a proxy (proxy: on the rule-provider), those lists can't load while that proxy node is down — the core connects but Rule mode has nothing to match on. See Troubleshooting.

Related

Clone this wiki locally