Getting Started with Clash Profiles: Import, Switch, and Override Multiple Subscriptions
Learn how Clash profiles, subscription URLs, and config.yaml work together. Keep multiple configs, switch by use case, and override ports and rules.
Clash profiles, subscription URLs, and config.yaml: What’s the Difference?
Open the Profiles page in Clash Nyanpasu. Each entry in the list is a profile, sourced either from a remote subscription or a local YAML file. You can keep multiple profiles in the list and switch between them as needed. Switching changes the active profile; it doesn’t automatically combine nodes, proxy groups, or rules from different providers.
| Item | What it is | Where to change it |
|---|---|---|
| Subscription URL | The address the client uses to fetch a remote config; it may contain an access token | Update the subscription source or import it again if the URL changes |
| Profile | A profile the client stores, lets you select, and applies | Manage profiles on the Profiles page; update or edit them based on their source |
config.yaml | A common filename for Clash configs; the filename alone doesn’t tell you which config is active | First distinguish the source file you maintain from the runtime config generated by the client, then decide which one to edit |
Compatible Clash or Mihomo configs can include fields such as proxies, proxy-groups, and rules, or reference separate proxy collections. When applying a profile, the client may layer settings or overrides on top before passing the result to the core. If a file edit has no effect, first check the active profile and its overrides, then make sure you didn’t edit a runtime file that gets regenerated.
Import and Update Two Subscriptions Separately
- Check the subscription format. On your provider’s website, choose a Clash or Mihomo subscription compatible with your core. A web dashboard URL, login page, or link to a single node can’t be used as a complete YAML config.
- Import each one separately. Open Profiles, choose the remote source option in the add-profile flow, enter the first subscription URL, and save. Confirm the new entry appears in the list. Repeat these steps to add the second subscription; don’t enter its URL as the source for the first profile. The exact option names may vary by version—look for the remote and local source choices.
- Name profiles by use case. For example, use “Everyday” and “Backup” rather than putting a URL or account name in the profile name. To keep a separate YAML copy for testing, use the local import option on the Profiles page and give it a distinct name, such as “Rule Testing.”
- Update each profile individually. Use the entry’s menu to update the subscription you want. Updating fetches that profile’s contents again; switching selects which profile is active. To confirm a backup subscription works, switch to it and make sure its proxy groups and nodes load—an update success message alone isn’t enough.
If an import fails, first identify the step that went wrong. For 401 or 403 errors, check the URL, token, and server access restrictions. If the client downloads content but reports a YAML parsing error, return to the provider’s dashboard and confirm you selected a Clash or Mihomo config, not a login page or a subscription format for another client. An expired subscription URL may still return a web page, so a successful download doesn’t mean the config is valid.
After Switching Profiles, Check Proxy Groups and Rules
- On the Profiles page, select “Backup.” Confirm the active-profile indicator moves to that entry and that the config loads without errors. Opening an entry’s menu or updating its subscription doesn’t switch profiles.
- Open the Proxies page and check that the new config’s proxy groups are listed. For groups that require manual selection, check the selected node or nested group; don’t assume a selection from the previous profile carries over. Even if two subscriptions use the same group name, their members may differ.
- To test routing, set the proxy mode to Rule. In the same app, open a test URL you’re allowed to access, then check the Connections page to see the matched rule and outbound policy. Global and Direct modes can’t verify
rulesmatching. Existing connections may be reused by the app; if you can’t see the effect of a switch, close old connections or restart the test app before making a new request.
If the test app doesn’t appear in the connection list at all, first check whether its traffic is reaching the core. For a browser, start by checking whether the system proxy is enabled. For apps with a manually configured proxy, check the port. Apps that don’t follow the system proxy need TUN enabled and working. TUN determines how traffic reaches the core; the profile’s rules determine how it’s routed once it gets there. If an app can’t connect, you don’t need to delete the subscription as a first step.
Override the Port: Change the Mixed Port to 17890
Updating a remote subscription fetches its source content again, so keep persistent local changes separate from the subscription. Suppose another program on your computer is already using 7890. If you want every profile to use the same listening port, start with the client’s port settings. To change just one profile, attach an override to that profile if your version supports it. This avoids affecting the backup. If you can’t find a per-profile override option, test the change on a local copy.
If YAML overrides support merging top-level fields, you can set the mixed port with this line. You can also edit the existing mixed-port in a local YAML file used for testing; don’t add the same key twice at the same level. 17890 is an example—make sure the port is available before using it.
mixed-port: 17890
- First, check that the port is listening. Save and reapply the target profile. If the log reports
address already in use, check the specific address and port in the error.mixed-portwon’t automatically change separately configuredportorsocks-portvalues. - Then update your apps. The mixed port accepts both HTTP and SOCKS proxy connections. In apps where you entered an address manually, change
127.0.0.1:7890to127.0.0.1:17890. For apps that use the system proxy, check the proxy address and port currently set in your operating system. - Finally, check which profiles are affected. Switch to the backup profile and confirm its listening port is as expected. If both profiles changed but you only meant to change one, check for a global setting or override. If client port settings and an override are both configured, trust the actual listening port and, where possible, keep only one source of settings.
Rule Overrides: Where to Place a Direct Rule
In Rule mode, the core checks rules in order and typically uses the policy from the first matching rule. This example tests rule ordering by sending example.com and its subdomains through DIRECT. In a test copy, add this line to the existing rules: list before any rule that might match the same domain, and before the fallback MATCH rule. Keep the existing rules—don’t replace the entire list with this line.
- DOMAIN-SUFFIX,example.com,DIRECT
If you use an override, first check how it handles arrays. Some merge operations replace the entire rules list, so a single rule won’t necessarily be appended automatically. If your override method doesn’t clearly support inserting a rule, test on a local copy before deciding how to maintain it. When using named proxy groups, check each profile’s group names; a group in “Everyday” may not exist in “Backup.” The built-in DIRECT policy doesn’t depend on a custom group name.
After applying the change, revisit https://example.com/ in Rule mode and check whether the new connection matches DOMAIN-SUFFIX and uses DIRECT. A page loading only confirms that the request succeeded; it doesn’t prove the expected policy was used. If another rule matched, check the rule order and whether the override took effect. If the right rule matched but the page still won’t load, check your direct connection and DNS.
Subscription Stops Working After an Update: Roll Back and Troubleshoot
- Keep the previous profile. Switch to a backup profile you’ve already tested and confirm that the core loads normally. Don’t start by deleting and reimporting the subscription—you could lose the original entry and settings you need for comparison.
- Test the source config and overrides separately. Note which overrides are attached to the profile. If your version lets you disable an override or detach it, temporarily remove the most recently changed one and apply the profile that’s having trouble. If it works again, check the override’s port, rule order, and proxy group names. If loading still fails, inspect the updated config and the core’s error logs.
- Restore one change at a time. First confirm the base config loads, then restore changes such as ports and rules one by one. Change only one thing at a time, and test a new connection with the same app and URL to pinpoint which layer is causing the problem.
For everyday use, you can keep just three profiles: “Everyday” and “Backup,” which update from their providers, and “Rule Testing,” which you maintain manually. To review the import steps, see the Getting Started guide. For subscription sources and update settings, see the subscriptions section in the full guide.