What to Sync: Subscriptions, Overrides, and Device Settings
Importing the same subscription URL on your computer and phone only means both devices get their configs from the same source. They may refresh at different times, run different cores, or have different proxies selected in a policy group. Aim to keep the same rules and policies for each type of traffic—not to make every client state identical.
- Subscription source: Check whether the URL returns a complete Clash YAML config or data intended only for a proxy provider. The former can be imported as a config; the latter requires a compatible main config to reference it and cannot be used as a complete config on its own.
- Shared overrides: Maintain custom domain rules and policy group references in one place. How they’re merged depends on each client’s override feature; override formats are not a universal interface shared by Clash and mihomo clients.
- Device settings: Manage listening ports, system proxy toggles, TUN permissions, and current policy group selections per device. For example, a desktop config might use
mixed-port: 7890. If another app is already using port 7890, change it on that device instead of making your phone use a different port too.
Choosing Between Subscription URLs, Gists, and WebDAV
| Method | Best for syncing | Refresh or restore requirements |
|---|---|---|
| Subscription URL | Upstream configs with frequently changing proxies | The client must be able to fetch and parse the format; refresh timing is managed separately on each device |
| Gist | Rule snippets without credentials and change history | Retrieve manually or use a compatible tool; fetching the latest version does not mean the client has applied it |
| WebDAV | Access-controlled config backups and device migration | Requires a WebDAV-capable client or file manager; whether you can restore to another client depends on the backup format |
Subscription URLs: Let the upstream handle upstream config
If all your devices support remote configs, import the same subscription URL on each one and refresh them manually. If your client supports hourly refreshes, start with every 12 hours and adjust based on the upstream service’s request limits. Mobile background refreshes may be delayed by the operating system. Before comparing rules, bring both devices to the foreground, refresh them, and confirm the new config is active.
Changes made directly to a generated subscription file may be overwritten at the next download. Put custom rules in an override location explicitly supported by the client. If a device only supports importing complete YAML files, maintain a merged config for it—don’t import an override snippet as a subscription URL.
Gists: Store rule versions, not subscription credentials
A “private Gist” usually means a GitHub Secret Gist. It won’t appear in public listings, but anyone with its URL can access it, so it isn’t private to your account. Use it for sanitized rule snippets, supported core versions, and change notes. Keep subscription URLs, proxy credentials, and control API keys on each device or in access-controlled storage.
When publishing, note the revision you’ve verified works. Fetch that revision on your desktop and test it before using the same version on your phone and tablet. If a tool always fetches the current content, edits will affect future downloads. For a reliable comparison, fetch a specific revision rather than getting the “latest” separately on each device.
WebDAV: Test a restore before scheduling backups
Client-exported backup archives may include UI preferences, subscription URLs, and device-specific settings, so first test restoring them in the same client. For cross-client migrations, it’s usually better to back up YAML and rule snippets separately, then import them in the target client’s format. WebDAV stores and retrieves files; it doesn’t merge configs for the core. After downloading a file with a file manager, you still need to import and activate it in the client.
Use HTTPS and a dedicated backup account. If your tablet is only used for restores, give its account read-only access on the server. Keep at least two dated snapshots so your computer and phone don’t overwrite the same file. After the first backup, test the restore process with a new test config. Check the proxy list, rules, and ports before replacing your everyday config.
Cross-Device Overrides: Check the Core, Then Rule Order
Similar client names don’t guarantee they use the same core. Check the client’s core information or startup logs to identify the core actually in use, then confirm both devices accept the shared fields. For example, a mihomo config may use rule types unsupported by older Clash cores. If the cores differ, split the config into shared and core-specific rules, or keep a separate complete config for each core.
The merged rules snippet below illustrates rule order; it is not a complete YAML file you can import as-is. It uses only DIRECT and REJECT to avoid relying on custom policy group names from a particular subscription.
rules:
- DOMAIN,blocked.example.com,REJECT
- DOMAIN-SUFFIX,example.com,DIRECT
- MATCH,DIRECT
In rule mode, the exact domain rule above takes precedence. If DOMAIN-SUFFIX comes first, blocked.example.com will match the suffix rule first. If you add a new rule after the existing MATCH, it won’t run at all. Keep the fallback policy required by your actual config; don’t copy the direct-connection fallback from this example without checking.
Updates and Rollbacks: Compare the Same Rule on Two Devices
- Set a baseline. Record the subscription config, last successful refresh time, override revision, and actual core version on both devices. Before updating, save a known-good config. If the client can export the merged result, save that too.
- Change one thing at a time. Fetch the subscription or update the override on one device first. Switch to rule mode and send a known test request through the client. Check the matched rule, target policy group, and actual outbound connection in the connection details or runtime logs. Track these separately: matching the same rule doesn’t mean both devices selected the same proxy.
- Separate routing differences from traffic-capture differences. With only the system proxy enabled on desktop, some apps may bypass it. If only the other device has TUN enabled, the two devices may capture different traffic. If the test request doesn’t appear in the connection logs, first check whether app traffic is reaching the core, then check the rules. Handle platform permissions, TUN toggles, and routing settings per device.
- Verify before rolling out. Once the first device passes, retest the same override version on the second. If an update only fails on one device, check whether its core supports the fields, whether a policy group was renamed, and whether a listening port is already in use. To roll back, restore the last working subscription snapshot along with its matching override. Restoring only one may leave policy group names out of sync.
Start with three habits: let each client refresh its own subscription, edit shared rules in one place, and keep a verified config snapshot you can restore. New devices can then start from the same rule version while retaining their own platform-specific ports and traffic capture settings.