How Profiles, Subscription Links, and config.yaml Work Together
A profile is an item in the client's configuration list that you can activate. A subscription link tells the client where to fetch a configuration, while a local config.yaml is a file you provide directly to the client. Either can create an entry in the list. Once activated, an entry may be combined with the client's port settings, operating mode, or override layers before the resulting configuration is passed to the core.
- Remote profile: Stores a subscription URL and fetches the configuration again when updated. Before importing, make sure the server provides a Clash or Mihomo format supported by your client. Some subscription links return proxy node lists intended for other clients.
- Local profile: Imported from a file on disk, making it useful for custom rules, a known-good baseline, or reproducing configuration issues. Many clients copy the file during import. After editing the original in your downloads folder, check whether the client needs you to import or reload it again.
- Effective configuration: The result currently loaded by the core. When troubleshooting, if the original file specifies
7890but the client shows a mixed port of7897, check the client's port settings or override layers first, and use the port currently listening as the source of truth.
A profile can contain multiple proxy groups and nodes. Switching profiles replaces the entire configuration. Changing a proxy group's selection from node A to node B on the “Proxies” page only changes the outbound within the current configuration.
Importing Subscriptions and Local YAML Files
Import a Subscription: Check the Download Before Activating
- Open the “Subscriptions” or “Profiles” page in the client sidebar. Find the subscription URL field, or choose a remote configuration from “New,” then paste the full URL provided by the service. Menu names vary by client and version.
- Import the link and confirm that a remote profile card appears in the list. If the core reports a YAML parsing error, first check that the URL returns a configuration rather than a login or error page. If it reports an unsupported field or protocol, check that the subscription format is compatible with the core.
- Select the entry and confirm it becomes the active profile, then open the “Proxies” page to check for the expected groups. A successful import only means the configuration was added to the list; check the selected state and load logs to confirm it is active.
Import a Local File: Set Up a Direct-Connection Baseline
Save the following content as config.yaml in UTF-8, then choose local import on the “Subscriptions” or “Profiles” page and activate it. Using Mihomo v1.19.0 as an example, this baseline listens for local HTTP and SOCKS traffic on the mixed port 7890. In rule mode, traffic that reaches the core and matches the final rule uses DIRECT. Use it to test importing and switching on a network that already has direct access; no custom proxy groups are expected.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- MATCH,DIRECT
If the logs show address already in use, check whether another proxy client is running. You can also switch to an unused port, such as 17890, and update any apps with manually configured proxy settings. On Windows 11, open “Settings” → “Network & internet” → “Proxy” → “Manual proxy setup” to check the system proxy settings. Check the address and port there only when testing this system proxy route; TUN routing works differently.
Rename Profiles, Schedule Updates, and Keep Versions
Use names that identify the purpose and source, such as “Daily · Remote,” “Direct baseline · Local,” or “Rule testing · Local.” Edit the name or notes from “Edit” on the profile card, save, and confirm the updated label in the list. The name helps identify an entry; to change its subscription URL, edit the source field or create a new remote profile, then confirm which one is selected.
- Start with a manual update. From the remote profile's menu, choose “Update” and check the result and last-updated time. If the node count drops unexpectedly, check the configuration returned by the provider, then look for parsing errors in the core logs.
- Then set an update interval. If the client supports scheduled updates per subscription, start with once a day: enter
1440if the field is in minutes, or24if it is in hours. Whether scheduled tasks run after sleep or require the client to stay open in the background depends on the client. - Keep a local copy you can roll back to. Before changing rules, save a working configuration as
daily-baseline-2026-11-26.yaml, import it separately, and label it with the date. Store copies containing credentials in a secure location. If the configuration relies on remoteproxy-providersorrule-providers, saving only the main YAML won't include those resources, so a complete offline restore may not be possible.
The subscription update interval controls how often the client downloads the main configuration again. The interval under proxy-providers in YAML controls updates for the corresponding proxy provider; these are separate schedules. To test a change, update manually first and check the load result in the logs. Don't treat the last download time as proof that the latest configuration loaded.
Switch Between Profiles and Roll Back Quickly
Before switching, note the current profile name, operating mode, and any proxy group selections you set manually. A group with the same name can have different members in each profile, and whether the previous selection carries over depends on how the client and core save selections.
- Select the target entry on the “Subscriptions” or “Profiles” page and wait for it to finish loading. If parsing fails, check the first error and field name, then confirm whether the client kept the previous profile active.
- On the “Proxies” page, check that the groups match the target profile, then make a fresh request in your browser. On the “Connections” page, check the destination domain, matched rule, and outbound. Existing long-lived connections aren't a reliable way to verify a recent switch.
- If the new request fails, switch back to a known-working profile and make the same request again. If it works after rolling back, compare the proxy groups, rules, and DNS fields in both profiles. If both fail, check shared settings first, such as the system proxy port, TUN status, or global overrides.
For example, with the direct-connection baseline above active in rule mode, a new request should appear on the Connections page with DIRECT as its route. If the browser can reach the site but the request never appears there, first check whether the traffic is going through the core. The system proxy only affects apps that honor that setting; with TUN enabled, check the client's routing settings too.
Config Overrides: Keep Local Changes Across Subscription Updates
Keep the remote configuration as an untouched upstream copy. For lasting changes to the log level, DNS, or custom rules, use the client's override feature when available. The example below shows only the field content needed to change the top-level log-level from info to debug. Use it in an override editor only if the client supports YAML merge overrides; this is not a standalone profile you can import.
log-level: debug
- Check the scope. A per-subscription override is best for changes specific to that subscription; a global override may also affect your local baseline. Reload after saving, then check the effective configuration or confirm that debug logs appear. Restore
infowhen troubleshooting is complete. - Check how lists are merged. Overrides for scalar fields are usually straightforward, but lists such as
rulesmay be replaced, prepended, or appended. Rules are evaluated in order in rule mode. If a custom rule is appended afterMATCH, the fallback rule will usually handle the request first. - Check references between fields. If an override rule refers to a proxy group, confirm that the effective configuration still contains a group with the same name. If an update changes the group name, the old reference may prevent the configuration from loading. Temporarily disable the override and reload to determine whether the issue is in the subscription itself or the merged result.
For everyday use, keep one remote main profile, one working local baseline, and one profile for testing. After updating the main profile, check the load result. Change one field at a time and test it with a new connection. If something breaks, roll back first, then compare the original configuration with the fields actually in effect. See the Profile section in the configuration reference for field details.