Advanced
Rule Providers 101: Self-Updating Rule Sets
Hand-writing hundreds of DOMAIN-SUFFIX rules is unmaintainable — the internet moves. Rule providers externalize rules into remote files that the core re-downloads on a schedule, leaving a single reference line in your config.
The basic recipe
Add two blocks to the Merge section of your global extend config:
rule-providers:
streaming:
type: http
behavior: classical
format: yaml
url: "https://example.com/rules/streaming.yaml"
path: ./ruleset/streaming.yaml
interval: 86400
rules:
- RULE-SET,streaming,Node Choice
- GEOIP,CN,DIRECT
- MATCH,Node Choice
interval: 86400 refreshes daily. The RULE-SET,streaming,Node Choice line means: any traffic matching anything in that rule set goes to the "Node Choice" proxy group.
The three behavior types
domain— plain domain lists; fastest matching, best for large lists;ipcidr— plain IP-range lists;classical— full rule syntax with type prefixes on every line; most flexible, slightly slower.
The declared behavior must match what's actually inside the file — a mismatch fails the whole provider at load time.
Where to find rule sources
The most actively maintained community collections are blackmatrix7/ios_rule_script (rules grouped per service, complete Clash formats) and MetaCubeX's meta-rules-dat. Choose rule sources like you choose providers: widely used, frequently updated, publicly hosted.
Debugging
- Provider downloads follow your proxy logic — if the first fetch fails, switch to Global mode and update again;
- The Rules page has search: type a domain to see exactly which rule catches it;
- Rules match top-down. A RULE-SET placed too late can be shadowed by earlier rules — order matters.
Resist hoarding. A dozen rule sets slow startup and bloat memory. Four or five cover a normal person: ad-blocking, streaming, AI services, local-direct, and a catch-all.
Windows 64-bit installer · v2.5.1 · free & open source