Getting Started 9 min read

Clash subscription links: import guide forYAML configs and Base64 proxylist formats

Learn how to import a Clash subscription and tell apart full YAML configs, Base64-encoded proxy lists, and proxy-providers.

Check what the subscription URL returns first

A subscription link is usually an HTTPS URL with an access token. The client requests that URL, and the response body is what it parses. A .yaml extension or whether the link opens in a browser does not tell you if it can be imported directly as a Clash config. The same service may return different formats depending on the export option or client request, so choose a link explicitly labeled “Clash Meta” or “mihomo” in the service dashboard whenever possible.

Response typeHow to identify itWhere to import it
Main YAML configThe top level usually includes proxy-groups: and rules:. Proxies may be listed under proxies: or referenced through proxy-providers:.Import it from the client’s “Subscriptions” or “Profiles” page and enable it as a profile.
Base64 proxy listThe response may be a long string of encoded characters. Once decoded, it contains newline-separated proxy URIs such as ss:// and vless://. Some services return a plain-text URI list instead.Use an import option that explicitly supports this list format, or get a mihomo config from the service dashboard.
Proxy provider resourceA YAML file usually starts with proxies: and lists proxy entries below it, without standalone routing rules or proxy groups.Loaded by proxy-providers in the main config, then used through a proxy group’s use field.

These are clues, not a simple check of individual fields: proxies: can appear in both a main config and a provider resource, and a main config may load proxies only through providers, with no inline proxy entries. If the response is a login page, renewal notice, or JSON error, the client still hasn’t received a valid config—even if the HTTP status is 200.

How to import a Clash subscription

This example uses Clash Verge Rev on Windows and macOS. Import remote configs from the “Subscriptions” sidebar. Other clients may call the same section “Profiles.” Don’t paste a main-config link into a field meant only for adding a single proxy.

  1. Copy the full URL. Choose an export format for mihomo in the service dashboard, then click “Copy subscription link.” If the URL was forwarded in a chat app, don’t include quotation marks or a trailing period. Keep everything after ? exactly as it is.
  2. Download the remote config. Open “Subscriptions” in Clash Verge Rev, paste the URL into the subscription field at the top of the page, and click “Import.” Wait for the profile card to appear. If parsing fails, check the format returned by the service before trying to add the same subscription again.
  3. Select the profile and check its policies. Select the new card on the “Subscriptions” page, then open “Proxies” to check the active proxy group and available nodes. Set the run mode to “Rule,” then check the loaded rules on the “Rules” page. A new card does not mean the config is active—especially if the client already had another subscription.
  4. Choose how traffic enters the client. For an initial test, enable “System Proxy,” test with a browser that follows system proxy settings, and check the client’s “Connections” page. To route apps that ignore system proxy settings, configure TUN as required by your platform. TUN changes how traffic enters the client; it cannot fix a subscription parsing error.

Main YAML config: how proxies enter the routing chain

The main config connects proxies, proxy groups, and matching rules. A proxy name under proxies can be referenced by a proxy group, and a group name can then be used as a rule target. A YAML file passing syntax validation does not guarantee that all references resolve. For example, if you rename a group from “Manual Select” to “Proxy Select,” update any rules that still point to the old name.

This local config illustrates references only. It uses the built-in DIRECT and needs no remote proxies. 7890 is a mixed inbound port set manually for this example; it may not be the port your client currently uses. Check the actual value shown by the client before connecting to a local listener.

mixed-port: 7890
mode: rule

proxy-groups:
  - name: "Manual Select"
    type: select
    proxies:
      - DIRECT

rules:
  - DOMAIN,example.com,Manual Select
  - MATCH,DIRECT

In Rule mode, DOMAIN matches example.com itself, not its subdomains. To cover the domain and its subdomains, use DOMAIN-SUFFIX. Rules are checked from top to bottom, and the first match determines where traffic goes, so put MATCH last. In this example, even if “Manual Select” matches, its only available option is DIRECT, so a direct connection in the logs is expected.

Base64 proxy lists: decoding doesn’t make them a main config

Base64 is an encoding, not a way to add routing rules, DNS settings, or proxy groups to a list of proxies. Decoding a proxy list and saving it as .yaml still leaves you with a few lines of proxy URIs—not a config with proxies and rules. The fact that a client can recognize a single URI from a QR code doesn’t mean it can import a full Base64 subscription as a profile.

  • Multiple export formats are available: Choose a Clash Meta or mihomo config whenever possible. Generic proxy subscriptions and full configs usually have separate URLs. Even if they belong to the same account, don’t guess the format from the link name alone.
  • Only a proxy list is available: First check whether the client has an import option for that list format and whether its core supports the listed protocols. If the client accepts only main configs, ask the service provider for a compatible format. Don’t submit a URL containing credentials or its decoded contents to an untrusted online conversion tool.
  • It looks encoded, but decoding doesn’t produce URIs: Don’t judge by whether the string ends in =. Check the format specified by the service provider. If the response is actually HTML, an error message, or empty, check your access permissions and subscription status first.

proxy-providers: reference proxy collections in the main config

proxy-providers defines a proxy collection in the main config; it is not a file extension for another kind of full config. This example uses type: file to show how the pieces fit together: place a collection file using the proxies: format at providers/nodes.yaml in mihomo’s working directory, then declare the provider in the main config. The working directory is where the client starts the core—not necessarily the directory containing the subscription file.

mode: rule

proxy-providers:
  service-nodes:
    type: file
    path: ./providers/nodes.yaml

proxy-groups:
  - name: "Proxy Select"
    type: select
    use:
      - service-nodes
    proxies:
      - DIRECT

rules:
  - DOMAIN,example.com,Proxy Select
  - MATCH,DIRECT

Here, use references the collection named service-nodes, while the rule references the proxy group named “Proxy Select.” If the service provides a remotely accessible proxy collection, follow its instructions to use type: http in the main config, set the resource URL with url, and choose an appropriate update interval. For example, interval: 3600 is in seconds and means one hour. It controls how often the collection refreshes, not how often the remote main config updates.

If you reuse this setup, make sure the group has the expected proxy selected. If DIRECT is one of the options, the group may still show a choice even when the collection fails to load. Also, rule-providers loads match conditions referenced by rules such as RULE-SET; it is not interchangeable with proxy-providers, which supplies proxies.

Troubleshoot failed imports and configs that don’t take effect

No profile card appears: check the download and parsing steps

  • Response is 401 or 403: Check whether the token was reset and whether the account still has access. A page opening in your browser because you’re signed in doesn’t mean the client can access the same content. Copy the dedicated subscription link again from the dashboard.
  • YAML parsing failed: Rule out HTML and Base64 lists first, then check indentation, the - before list items, and field nesting around the reported line. YAML uses spaces for indentation. If the client has local overrides enabled, disable them temporarily to distinguish the original config from the merged result.
  • Certificate error or timeout: Check your device’s clock, the subscription domain, and your network connection. If an update fails, make sure the current network can reach the subscription domain. Don’t disable certificate verification to work around a certificate error.

Profile selected: check proxies, policies, and traffic routing

  1. If the proxy group exists but offers only direct connections, check the core logs for the provider’s load status, then confirm the collection name appears under the group’s use field. A successful main-config update does not prove the collection updated successfully.
  2. If a test request appears on the “Connections” page but uses the wrong policy, open its details and check the mode, matched rule, and final route. For example, don’t use the match order in rules to explain results in “Global” mode. Switch back to “Rule” mode and test again.
  3. If the request doesn’t appear on the “Connections” page, close and reopen the test page to create a new connection. Make sure the browser is using the system proxy and that the request isn’t bypassing it through the proxy exception list. Don’t mistake traffic that never reached the core for a missing domain rule.

Finally, test “Update main config” and “Update proxy collection” separately: the first checks whether the config can be downloaded and applied again; the second checks whether the proxies in the group are still available. Keep custom rules you need long-term in client-supported local overrides where possible, so remote config updates don’t overwrite your edits.

Download Clash