Clash Verge Profiles: Switch, Merge, and Override Configs
Learn how Clash Verge profiles relate to config.yaml, how to add, switch, and update profiles, and how to keep custom rules with overrides.
Profiles vs. config.yaml: What's the Difference?
Open the Subscriptions page in Clash Verge Rev. Each selectable base configuration in the list is a profile. It can come from a remote subscription or a local YAML file. Two profile cards can hold different proxies, proxy groups, and rules. Selecting one does not load the proxies from the other.
config.yaml is a common YAML configuration filename, not a profile type. You can import a file named config.yaml as a local profile card. When running, Clash Verge Rev builds the configuration sent to the Mihomo core from the selected base profile, extensions, and client settings. The runtime configuration may not exactly match the imported file, and the filename does not determine which profile is active.
Create Two Profiles, Then Switch and Update Them
These steps use the Chinese-language interface in Clash Verge Rev 2.x. Depending on the version, some actions may be under a card's ⋯ menu or in its right-click menu. Keep a working profile, then import a second one so you can compare them and roll back if needed.
- Import a remote subscription. Go to Subscriptions, paste the subscription URL into the field at the top, and click Import. In the new card's Edit Info menu, give it a recognizable name, such as “Daily subscription.” The name helps identify the card; it does not add a proxy group with the same name to the YAML.
- Add a local profile. Go to Subscriptions → New, select Local as the type, and save. Open Edit File from the card menu and enter a complete Mihomo-compatible configuration. If your version offers a file import option, you can select an existing
.yamlfile instead. A rules snippet cannot replace a complete configuration: any custom proxy groups referenced by the rules must be defined in the same profile. - Switch profiles and verify. Select the second profile card on the Subscriptions page and confirm that the active indicator moves to it. Then open Proxies and check for a group name unique to the second profile, or inspect that group's members. Both subscriptions may have a group named “Auto Select,” so that name alone isn't enough to confirm the switch.
- Update a remote profile on its own. Open the menu on the remote profile you want and select Update. This fetches new content for that card; updating another card does not switch to it. If a local profile has no subscription URL, maintain it through Edit File.
After switching, verify the connection with a new request rather than one that was already open. For example, a browser may reuse an existing connection. If you test in a browser, make sure it actually routes traffic through the current system proxy or TUN connection to Mihomo; some apps use their own proxy settings. Loading a configuration successfully and routing app traffic through the core are two separate things.
Merge and Override: Keep the Base Config Separate from Personal Settings
To apply shared settings across profiles, find Global Extension Config on the Subscriptions page and open Edit File. Merging here applies YAML to the currently selected base profile; it does not combine all your subscriptions into one. You can use the following field to remember proxy group selections:
profile:
store-selected: true
Here, profile is a field in the Mihomo configuration, not a client subscription card. store-selected tells the core to remember the selected option in each proxy group. If a group is renamed after an update or a proxy is removed from it, the previous selection may not be restored. If you already have global YAML, add this line to the existing profile section rather than creating another key with the same name.
Rules are an ordered list. To preserve rules from a subscription, don't assume that adding a new rules list in the extension config will append to the original. If a profile card has an Edit Rules option and the editor lets you prepend rules, use it for that profile. Edit the Global Extension Script only when you want a rule shared across all profiles.
Keep a LAN Direct-Connection Rule with an Override
Suppose your home printer resolves to printer.home.arpa through local DNS, and you want that hostname to match DIRECT. First, back up the existing content under Subscriptions → Global Extension Script → Edit File. The example below is for an empty script. If you already have logic, add the rule-insertion statement to your existing main function instead of replacing the script.
function main(config) {
const rule = "DOMAIN,printer.home.arpa,DIRECT";
if (Array.isArray(config.rules) && !config.rules.includes(rule)) {
config.rules.unshift(rule);
}
return config;
}
DOMAIN matches this exact hostname; it does not match the entire home.arpa suffix. The script inserts the rule only if a rules list already exists and the exact rule isn't already present. It does not replace the subscription's list. The new rule goes at the top to avoid being caught first by a broad suffix rule or the final MATCH. If the exact rule is already in the list, the script leaves it where it is; check whether an earlier rule matches first.
After saving, set the mode to Rule on the Proxies page, then use an app that routes through your current connection method to access the printer by hostname. If the request reaches the core, open Connections and check the matched rule and outbound: they should correspond to this domain and DIRECT. If there's no connection entry, first check whether the app is bypassing the system proxy. If the hostname doesn't resolve on your device, fix your home DNS first; DIRECT controls the outbound route but doesn't create a DNS record.
Rules Disappear or Profiles Won't Switch After an Update? Troubleshoot in Order
- Check which profile is active. Go back to Subscriptions and check the active indicator, then compare it with the groups and members on the Proxies page. After a remote profile update, the provider may have changed proxy names or group structure, which can look a lot like the wrong profile is selected.
- Check where you changed the rule. If you edited the remote profile's original file, check whether the line is still there after the update. If you edited the Global Extension Script, first make sure the base configuration has a
ruleslist, then confirm the script was saved and the current mode is Rule. Test with the full hostname; don't substitute an IP address when checking aDOMAINrule. - Check rule references and syntax. If you replaced
DIRECTwith a custom group name, it must exactly match the group defined in the current configuration, including spaces and capitalization. If saving reports a YAML error, check indentation and duplicate keys near the reported line, then make sure the rule has all required fields. - Revert the latest change. If even your previous profile won't open after enabling the global script, restore the script backup first, then switch back to the profile that worked. Switching cards alone won't bypass the global script. Once things are working again, add one rule at a time and test each with a new connection.
Finish with a full check: keep one working profile, switch to the test profile, and verify your custom rule. After updating the test profile, make a new request, then switch back to the original. This confirms that profile switching, remote updates, and rule overrides each work as expected. If you need to document troubleshooting, note the profile name, error line, and rule type. Keep subscription URLs and proxy credentials out of public screenshots.