What Is a Clash Profile? Import Subscriptions, Switch Configs, and Manage Multiple Profiles
Learn how config.yaml works, how profiles relate to subscription URLs, and how to import, name, update, and switch between multiple configs.
Profiles, subscription URLs, and config.yaml: What’s the difference?
A profile is a selectable configuration in the client. It can come from a local YAML file or a subscription URL. The URL is the source for fetching the config; the client usually saves the last successfully downloaded version for the core to load. The profile name shown in the interface is often just a convenient label and doesn’t have to match the filename on disk.
config.yaml is a common filename, not a requirement for importing a config. The client may also combine the selected profile with local settings before passing it to the core. For example, the mixed port set in the interface may override mixed-port in the subscription. If the config text doesn’t match what’s happening at runtime, check the effective values shown in the client first.
Understand YAML with a Direct-Connection Config
Save the file below as local-direct.yaml. It uses fields supported by mihomo and exposes a mixed proxy port on this device only. It has no remote nodes, and both rules send traffic directly. If another app is already using 7890, choose an available port and check whether the client has a separate port setting.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- DOMAIN,example.com,DIRECT
- MATCH,DIRECT
mixed-portlistens for both HTTP and SOCKS proxy traffic on the same port.allow-lan: falseprevents access from other devices on the local network.mode: ruleselects the outbound route based on rules. The client checksrulesfrom top to bottom, withMATCHat the end handling all remaining connections.- Subscriptions commonly use
proxiesto define nodes,proxy-providersto reference node collections, andproxy-groupsto organize outbound options. Any custom group name referenced by a rule must match a group that’s actually defined.
Import a Subscription or Local YAML File
These steps use the Chinese interface in Clash Verge Rev 2.x. Other clients may call the same section “Configuration” or “Profiles.” First, check whether you have an HTTPS URL or a YAML file saved on disk, then follow the relevant steps.
- Import a subscription URL: Open “Subscriptions” in the sidebar, paste the URL into the field at the top, and click “Import.” Copy the entire URL, including the question mark and any parameters after it. Use an endpoint the provider identifies as compatible with Clash or mihomo. Don’t mistake an account-management page for a subscription URL.
- Import a local file: Drag a
.yamlor.ymlfile onto the “Subscriptions” page. If your version has a file picker, you can import it from there instead. Save files from an editor as UTF-8, indent with spaces, and make sure the system hasn’t appended.yaml.txtto the filename. - Check that the config works: Find the new card on the “Subscriptions” page and select it, then check the “Proxies” page for the expected proxy groups. Seeing a card in the list doesn’t mean that profile is active. The direct-connection example above has no custom groups, so you won’t see a node list when using it for practice.
Saved Successfully but Won’t Load? Check the Response
If the response is a login or error page, the client received HTML, not YAML. A file containing only a node list may not be a complete profile either: it might need to be used as a proxy-providers source, or you may need the full-config endpoint from your provider. If the log gives a line number, check the indentation, colon, and list marker on that line and the one above it. If it reports an unsupported protocol, check the active core and its version. Clash and mihomo don’t support exactly the same fields and protocols; changing the file extension won’t fix compatibility issues.
Switch Profiles, Change Nodes, and Route Traffic
Switching profiles replaces the entire config; switching nodes usually changes only the outbound selected in the current proxy group. A profile can define multiple groups, so you don’t need to import a separate config for every node. To temporarily change the outbound for the same subscription, choose a node on the “Proxies” page. To use different rules or another subscription source, switch profiles on the “Subscriptions” page.
- Select the target card on the “Subscriptions” page and make sure the selected indicator moves to it. Then check the group names on the “Proxies” page. If both profiles use the same group name, confirm that the available nodes in the group are the ones you expect.
- Check the routing mode. To test rule-based routing, switch to “Rule” mode. Global and Direct modes don’t select outbounds by evaluating this rule list, so testing with them can lead to the wrong conclusion.
- If the core loads successfully but the “Connections” page shows no activity, check whether the test app is sending traffic through the core. Set proxy support in the app to the local proxy port shown in the client, or use the system proxy or TUN as needed. Switching profiles alone won’t route every app through the proxy automatically.
- Test with a new connection. On the “Connections” page, check the destination domain, matched rule, and actual outbound. If the app reuses an existing connection, close it or restart the app and try again. A page loading successfully confirms only that the request worked; it doesn’t tell you whether it used a direct connection or the intended proxy group.
If the result isn’t what you expected, switch back to the last profile you verified, then check the mode and proxy group selection. Node selection may be remembered differently across client versions. Switching profiles back doesn’t necessarily restore every interface setting or the previously selected node.
Name, Update, and Back Up Multiple Profiles
Name Profiles by Source and Purpose
Names like “Subscription A · Daily” are easier to tell apart than “Subscription 1” and “Subscription 2.” For example, use “Subscription A · Daily,” “Subscription B · Backup,” and “Local · Rule Test.” To keep a snapshot from a particular day, try “Local · Daily Backup · 2026-09-18.” If the client lets you change the display name, there’s no need to edit the YAML just to rename it. Never use a URL containing a token as a profile name.
Three Types of Updates
| Action | What Gets Updated | What to Check Afterward |
|---|---|---|
| Refresh Remote Subscription | Fetches the entire remote config again, which may change nodes, group names, and rules. | Check the update time, group names, and active rules. There’s no need to create another card for the same URL. |
| Update a Provider | Refresh the node collection for a proxy-providers entry or the rule collection for a rule-providers entry. | Make sure the relevant collection updated successfully. This won’t change the order of rules in the main config. |
| Edit a Local Config | Edit the local YAML. If the client saved a copy when you imported it, changes to the original file won’t sync automatically. | Save your changes in the client, or reimport the edited file. Then confirm that the updated version is selected. |
If the client supports scheduled refreshes, start with the interval recommended by your provider. After changing the subscription URL or seeing an authentication error in the logs, refresh it manually and check the result rather than repeatedly retrying with shorter intervals. If a proxy group disappears after a refresh, check whether the updated subscription renamed it and whether your local rules still reference the old name.
Keep Custom Rules Separate from Remote Configs
When refreshing a remote subscription, the client may overwrite its local cache with the newly downloaded config. To keep custom rules, use an override or merge feature explicitly supported by the client. If there isn’t one, save a separate local test profile and make changes to that copy. To make sure a custom rule takes priority, confirm that it appears after merging but before broader rules and the final MATCH.
Back up a verified local config and note your commonly used groups and outbounds. If the backup’s providers still point to remote URLs, it isn’t a complete offline copy; those collections may need to be fetched again on another device. When restoring, import the copy and test it first. Remove the old config only after verifying a new connection.
Troubleshooting: Check in This Order
- Can’t import: First check that the source is correct and returns a complete config. Then check the YAML line number or core compatibility error in the logs.
- Imported but didn’t switch: Check the selected indicator on the “Subscriptions” page, then review the load logs. If a group is missing or a port is in use, fix the config or adjust the runtime settings first.
- Switched, but traffic hasn’t changed: Test a new connection and check whether the app is sending traffic through the core. Then check the routing mode, matched rule, and selected outbound in the proxy group. Don’t delete the entire profile because one connection took the wrong route.
- Changes disappeared after an update: Check whether you edited the remote cache or a separate local copy, then review where the override applies. Restore a working version first, then move over any changes you want to keep.
Change one setting at a time while troubleshooting. Keep the current working config, and after each change, start a new connection to the same domain using the same app. This makes it easier to tell whether the issue is with the subscription, config loading, or traffic not reaching the core.