Why interval and URL deserve their own checklist
Subscription YAML from airports often hides complexity inside a wall of included lists. When you graduate to maintaining modular rule sets, you stop pasting ten thousand lines into rules: and instead hoist bundles into rule-providers objects that download from HTTPS endpoints. That architectural win collapses when three basics stay fuzzy: the numeric interval unit, the on-disk path where snapshots land, and the exact RULE-SET lines that bind providers into evaluation order.
Misunderstanding any one of those surfaces as ghost bugs—traffic still flows, yet routing disagrees with intuition because the cached file never refreshed, the GUI merged another provider over yours, or an upstream mirror rotated URLs without you noticing. This article supplies a deterministic recipe so your maintenance loop stays boringly predictable.
Mental model: providers, GEOIP data, and subscriptions
rule-providers fetch structured lists—typically domain lists, IPCIDR aggregates, or classical rule snippets—and expose them to the engine through RULE-SET references. That is distinct from downloading proxy nodes via proxy-providers, and also distinct from the geolocation databases that power inline GEOIP evaluation unless your workflow deliberately replaces pieces with remote equivalents.
GEOSITE-like bundles shipped as remote YAML or compact binaries behave like designer groceries: you still cook with them inside rules:, but the pantry stock rotates when your timer fires. Treat each remote mirror as a polite HTTP neighbor; ultra-short polling rarely buys proportional routing accuracy.
Syntax drift: Field names occasionally shift between Meta releases. Cross-check the upstream rule-provider syntax page when upgrading cores—capabilities usually migrate rather than vanish.
Step 1: declare each remote bundle under rule-providers
Start with the mandatory triangle: type: http for network-backed artifacts (local-only experimentation can use file, but HTTP is the common production path), a reachable url, and a deterministic path where the core persists fetched bytes between restarts. Pair those with behavior—choose domain, ipcidr, or classical so the parser interprets payload shape correctly—and align format with what the mirror actually publishes (yaml text versus newer compact bundles when your build supports them).
Example skeleton (names illustrative—swap URLs responsibly and honor mirror policies):
rule-providers:
community-domains:
type: http
behavior: domain
format: yaml
url: "https://example.tld/rules/geosite-google.yaml"
path: ./ruleset/community/domains/google.yaml
interval: 86400
community-ip:
type: http
behavior: ipcidr
format: yaml
url: "https://example.tld/rules/geoip-netflix.yaml"
path: ./ruleset/community/ip/netflix.yaml
interval: 43200
Headers belong here only when operators document them—generic User-Agent spoofing without cause creates needless support churn. Prefer mirrors that permit straightforward GET semantics unless contractual obligations say otherwise.
Path hygiene across reinstalls
Relative paths anchored inside the profile directory survive most GUI upgrades intact, while absolute paths tied to a single laptop username fracture the moment you clone the profile to another machine. If you orchestrate containers or systemd units, mount the directory containing path targets so refreshes remain observable from the host for audits.
Step 2: insert RULE-SET rows in evaluation order
Providers never participate until rules: references them. Each RULE-SET line names the provider key plus the policy target—commonly a proxy group name or DIRECT. Because Clash evaluates rules top-down first-match, park precise domain exceptions ahead of broad bundles, and keep GEOIP catch-alls where your architecture expects them—often after explicit lists but before terminal MATCH.
rules:
- RULE-SET,community-domains,Proxy
- RULE-SET,community-ip,Proxy
- GEOIP,CN,DIRECT
- MATCH,Proxy
If traffic ignores your shiny bundle, suspect ordering—not interval—first. The companion guide on rule order and MATCH priority explains why an earlier broad rule silently consumes flows you meant to carve out with remote lists.
Step 3: interpret interval as seconds and choose humane cadence
On Mihomo-class cores the refresh knob for rule-providers is conventionally measured in seconds. That means 86400 ≈ once per day and 3600 ≈ hourly. Beginners sometimes assume minutes because GUIs elsewhere label timers differently—double-check before setting 300 thinking “five hours” when the runtime interprets five minutes.
Practical etiquette: start near daily refresh for community mirrors unless release notes prove hourly churn. Aggressive intervals multiply TLS handshakes, inflate mobile hotspot usage, and annoy operators who rate-limit abusive loops. If you need emergency freshness after an upstream incident, trigger a manual reload (API or GUI) instead of permanently shortening everyone’s baseline.
When mirrors publish digest headers or version tags in filenames, pairing conservative intervals with occasional manual checks catches silent mismatches—your timer still fires even if the CDN serves identical bytes for weeks, which is fine when routing stays accurate but confusing when you expected visible churn.
Mirrors are not infinite: When multiple devices poll identical URLs with ultra-short timers, traffic looks like a denial-of-service rehearsal even if each laptop “feels” reasonable alone. Stagger intervals per device class if you must diverge.
How this interacts with GEOIP and GEOSITE-style workflows
Inline GEOSITE,category,policy lines lean on embedded geodata catalogs maintained through separate knobs (geodata-mode, downloads, update channels—exact labels vary by distribution). Remote rule sets referenced via rule-providers often imitate GEOSITE ergonomics conceptually—think curated bundles of domains—but they hydrate through HTTP snapshots you control. Avoid mixing the mental models: database freshness for builtin categories ≠ your provider’s interval.
When you need country-level catch-alls, pairing explicit remote domain bundles with conservative GEOIP rules remains a staple pattern; our dedicated walkthrough on GEOIP and GEOSITE split routing focuses on country grammar while this article focuses on modular refresh plumbing.
Merge layers, GUIs, and hidden duplicate providers
Desktop shells frequently merge vendor subscriptions with local snippets. If two merged fragments declare the same provider key with divergent URLs or intervals, runtime behavior follows whichever merge strategy your client documents—often last-writer-wins or prepend precedence—leaving you staring at the wrong HTTP endpoint during debugging.
Fix collisions by renaming personal providers uniquely (personal-geosite-ai instead of reusing reject), isolating overrides inside mixin files as taught in the Mihomo mixin guide, and exporting the effective YAML after merges when uncertainty persists.
First boot downloads versus periodic timers
The first time a profile loads, Mihomo-class cores typically hydrate missing provider files immediately so routing does not run half-empty while timers sleep. That eager fetch is easy to mistake for “interval equals zero,” yet periodic refreshes still obey your numeric schedule afterward. Document this distinction when filing bug reports—screenshots of a successful cold start do not prove hourly polling works unless logs show repeating cycles hours later.
Offline installs deserve explicit rehearsal: copy profile YAML plus whatever cached blobs already exist, boot disconnected, and confirm behavior matches policy—some builds refuse partial modes while others fall back to embedded defaults. Air-gapped operators sometimes freeze intervals at extreme values and rely on approved artifact drops instead of live HTTP; if that describes you, codify the manual swap procedure beside the YAML so teammates do not unknowingly re-enable cloud pulls during emergencies.
Verification playbook after interval or URL edits
Apply changes, restart only when required (many builds hot-reload providers), then validate three signals: HTTP success without authorization errors, advancing file timestamps under your declared path, and log lines indicating provider refresh rather than silent reuse of stale disk caches. When dashboards expose REST controllers, compare reported versions before and after forcing reload—numbers should move if downloads succeeded.
Wait through at least one full timer cycle after edits; impatiently stacking manual reloads mid-debug mimics provider abuse patterns and obscures whether periodic timers still fire once calm networks return.
Troubleshooting quick matrix
- 403 or TLS failures: confirm mirrors allow your client fingerprint, captive portals are absent, and routing does not loop through the same proxy you are reconfiguring mid-fetch.
- Behavior mismatch errors: redownloaded payloads must match declared
behavior; classical snippets cannot masquerade as pure domain lists. - Stale routing despite fresh files: reevaluate rule order, DNS modes, and Sniffer interactions—fresh lists still lose if higher rules intercept flows.
- Merged configs resurrected old URLs: inspect both base subscription and mixin overlays; duplicates hide in appended YAML chunks.
Community bundle philosophy—what trade-offs popular archives make—benefits from context in the ACL4SSR versus Loyalsoldier comparison so you choose upstream sources worth polite polling in the first place.
FAQ
Does a shorter interval fix buffering video? Unlikely—streaming symptoms usually trace to nodes, congestion, or DNS. Interval tweaks only accelerate list freshness after operators publish changes.
Should rule-providers mirror subscription refresh cadence? Not automatically. Node subscriptions churn faster than curated domain archives; decouple timers so each remote feels polite treatment tailored to its volatility.
What if my GUI lacks a rule-provider editor? Author YAML directly or via merge layers; the core respects declarations regardless of whether the shell exposes a polished form. GUIs simply hide or reveal the same primitives.
Can I disable periodic fetch? Some workflows pin immutable lists with rare manual refresh—acceptable when policy mandates frozen audits—but confirm release notes about zero intervals versus omission defaults before relying on undocumented behavior.
Summary
Clash Meta users scaling beyond tiny inline rules arrays rely on rule-providers to keep remote domain and prefix bundles synchronized without hand-editing megabytes of YAML. Nail the basics—correct behavior, explicit path, polite interval measured in seconds, ordered RULE-SET references, and structured verification—and automated maintenance stops feeling like roulette. Keep GEOIP database plumbing mentally separate from HTTP provider timers, resolve merge collisions early, and escalate to transport troubleshooting when HTTP failures—not cadence—dominate logs.
Ready for a maintained Meta-class desktop client with sane defaults? You can download Clash from our official page and apply the schedule you designed here without rebuilding routing logic from scratch.