A URL is a download address, not a config format
Before importing, check two things: whether you have a URL or a file, and what the URL actually returns. An https:// link can return a complete Clash YAML config or a Base64-encoded proxy list. The same address may also return different content depending on the request headers. The presence or absence of a .yaml extension tells you nothing about the format.
| What you’ll find | How to identify it | How to import it |
|---|---|---|
| Clash YAML config | Readable keys and indentation, often with fields such as proxies, proxy-groups, or rules | Use “URL” for a remote address and “File” for a local file |
| Plain-text proxy list | Multiple proxy URIs, with lines starting with ss:// or trojan://, for example | Get a Clash config from the provider if available; otherwise, convert it to the target core’s format |
| Base64-encoded proxy list | The response is a block of encoded text; decode it locally to reveal proxy URIs, one per line | Decoding only restores the list; you still need to convert it for import as a complete config |
Also distinguish between a complete config and a proxy provider file. A document containing only a top-level proxies: key may be a proxy source referenced by proxy-providers. It lists available proxies but may not include proxy groups or routing rules. Even if the client accepts the YAML, that doesn’t mean the routing you need is configured.
Import a URL or file into Clash for Android
- Choose a subscription format. Look for a “Clash” or “Clash Meta / mihomo” export option on your provider’s site, and choose the one that matches the core used by your client. Make sure you copy the subscription URL, not a login page address or an individual proxy URI.
- Add a config. On the Clash for Android home screen, go to “Configs” → tap “+” in the top-right corner → “URL.” Enter a name and the full URL, then save. For a local config, choose “File” and open the YAML file using Android’s file picker. Other clients may label these options “New” or “Import”; the key is to choose the right entry point for a remote URL or local file.
- Select and start the config. Return to the config list and tap the imported entry. Go back to the home screen and start the service. When prompted the first time, approve Android’s VPN connection request. A config appearing in the list only means it was added—it doesn’t mean it’s selected or that the VPN is running.
- Check your proxy groups. Open “Proxy” on the home screen to see the groups and proxies actually loaded. Test a proxy, then visit a site that should be routed by a rule and check the logs to see which policy matched. If the selected group is
DIRECT, a successful proxy test doesn’t mean that site is using the proxy.
When to convert a Base64 proxy list
Base64 is an encoding, not Clash config syntax, and it does not provide encryption. Decoding ten proxy URIs still gives you only ten proxy definitions; it won’t create proxy groups or routing rules. Saving the decoded output as config.yaml won’t turn a URI list into a YAML config.
Use the provider’s format first; convert offline if needed
If your provider offers both a generic subscription and a Clash subscription, switch to the Clash URL compatible with your core so you can keep updating from that address. If only a proxy list is available, use a trusted offline tool to convert the protocols, servers, ports, and authentication fields in the URIs into proxies entries. Then check the proxy group references and rule targets. Don’t submit a full subscription URL to an online converter you don’t trust.
proxies: []
proxy-groups:
- name: Proxy Selection
type: select
proxies:
- DIRECT
rules:
- DOMAIN-SUFFIX,example.com,Proxy Selection
- MATCH,DIRECT
This example checks the references: the rule points to a proxy group named “Proxy Selection,” which currently contains only the built-in DIRECT policy, so it won’t establish a remote proxy connection. After conversion, put the generated proxies under the top-level proxies key and reference them in the group by name. If a proxy uses a protocol such as Hysteria2, make sure the core supports it. Converting fields to valid YAML won’t add protocol support to an older core.
Subscription update intervals and User-Agent
Config updates, proxy source refreshes, and health checks run on separate schedules
Updating a URL config downloads the entire config again. If the config editor offers “Auto Update” or “Update Interval,” use the unit shown beside the field. When the value is in minutes, 720 means 12 hours and 1440 means 24 hours. Server-side limits may delay automatic updates, so try updating the config manually when troubleshooting. A config imported via “File” usually has no remote URL; to replace the entire local config, import the updated file or switch to a URL from your provider.
HTTP proxy-providers in a config have their own interval, measured in seconds. For example, 3600 means one hour; this refreshes the proxy source, not the entire config. A proxy group’s url-test can also have an interval, such as 300 for five minutes, to schedule availability checks—not to download new proxies. Follow your provider’s recommended interval or rate limits.
Browsers and clients may receive different responses
User-Agent is an HTTP request header. Some servers use it to distinguish browsers, generic subscription tools, and Clash clients, so a browser response may differ from the one returned to a config import request. Use the provider’s clearly labeled Clash format whenever possible. Only set the request header as documented if the provider requires it and your client explicitly supports custom headers for subscription requests. Changing your browser’s User-Agent won’t affect requests sent by the client.
Troubleshooting failed imports and empty proxy lists
- Check the HTTP status and response body first. For
401or403, check the token, subscription expiry, and access permissions. For429, stop retrying and wait as instructed by the provider. Even with a200response, a body starting with<!doctype html>may be a login page or service error—not a config. - Then check parsing errors. If an error points to indentation or an invalid field type, check that line and its parent field, and use spaces for indentation. If the log reports an unsupported proxy type, return to the provider’s export options and choose a format compatible with your core. If a proxy group or proxy can’t be found, check that its reference name exactly matches its definition.
- If the config loads but groups are empty, check the proxy source. Make sure the newly imported config is selected, then check whether the proxy group references static
proxiesor externalproxy-providers. For the latter, verify that the source downloaded successfully, the group’suserefers to the correct provider name, and any filters aren’t excluding every proxy. - If proxies appear but connections still fail, check the running state separately. Make sure the VPN is running, the proxy group has an actual proxy selected, and check which rule matched the failed connection. Updating a subscription and changing routing rules are separate tasks. See the Proxy Group Field Reference to check the group type and reference syntax.