Identify a subscription format by its response body, not its URL
A subscription URL retrieves content; the response body determines how to import it. An address starting with https:// might return a Clash config, a node list, or a login page. The same URL may also return different formats depending on request parameters or the client identifier. Opening a URL in a browser only confirms that the request received a response.
| Format | How to identify it | How to import |
|---|---|---|
| Clash YAML | Top-level fields include proxies, proxy-providers, proxy-groups, or rules. |
First check whether it is a complete config or a proxy provider file, then import or reference it through the appropriate entry point. |
| Base64 node list | The content is a block of encoded text. Decoding it as UTF-8 usually produces one node URI per line. | Use an import option that supports this subscription format, or decode the outer layer first and convert each link separately. |
| Raw share links | The body starts directly with protocol prefixes such as vmess:// or trojan://, and may contain multiple lines. |
Import through a clipboard option that supports the relevant protocols, or map each link to a YAML node. |
First rule out an HTML login page or a JSON error response; either can come with an HTTP 200 status. If the response looks like Base64, decode it and check that each line actually contains a recognizable protocol prefix. The character set or the presence of a trailing = alone cannot tell you whether it is a node list.
Clash YAML: Full Configs and Proxy Providers
A full config controls more than just the nodes
proxies defines locally listed nodes, while proxy-providers can connect to separately maintained node sources. proxy-groups organize available policies, and rules determine which policy handles each connection. A full config may also include DNS and TUN settings. If you only need to add nodes to an existing config, migrate the relevant nodes or provider reference rather than replacing its routing rules with a different full config.
A file with only proxies may be a provider file
A YAML file containing only the top-level proxies key can provide node data for a provider, but it does not define selection groups or routing rules. Its role depends on how it is delivered: a main config can declare the source with proxy-providers and reference it in a policy group using use; nodes listed directly in the main config can be referenced by name in a group's proxies list. These fields take provider names and node names, respectively—don't mix them up.
Base64 Lists and Share Links: Two Layers to Decode
Outer Base64 simply wraps the entire node list as text; it does not encrypt it. When decoding, distinguish standard Base64 from the URL-safe variant based on the source: standard Base64 uses + and /, while the URL-safe version uses - and _. Some sources omit trailing padding. Split the decoded text on line breaks, handle both CRLF and LF, ignore blank lines, and preserve escape sequences within each link.
vmess://: A common sharing convention encodes each node's JSON as Base64. After decoding the full list, if you seevmess://, parse the link's payload according to that convention. If it doesn't decode to the expected JSON, check which share format the source uses.trojan://: A common format puts the password in the user-info section and the host and port in the address section. Query parameters carry options such as SNI, while the fragment provides a display name. Parse the URI first, then decode each field. Don't replace%40with@across the whole line first, or a character in the password could be mistaken for a separator.
“Generic share link” refers to a commonly used way to represent a protocol; it does not guarantee that every client recognizes its extension parameters. A full subscription URL may contain an access token, and a single-node link may include a password or UUID. Convert and inspect links locally; don't submit real data to an untrusted online converter.
Convert Nodes to Clash YAML: Check Every Field
Keep a copy of the original config before converting. The examples below use common share formats; check the link generator's documentation and the target core's field definitions for the actual parameters.
| Source | Target field | What to check |
|---|---|---|
VMess JSON fields ps, add, port, and id |
name、server、port、uuid |
Convert string ports to integers. If a name is already in use, rename it and update its references in groups. |
VMess fields aid and scy |
alterId、cipher |
Check the source convention and core support. Don't change a nonzero aid in an older link to 0 without a reason. |
VMess net=ws |
network: ws、ws-opts.path、ws-opts.headers.Host |
The path, WebSocket Host, and TLS SNI are separate fields; map only values actually provided by the link. |
Trojan user info, address, sni, and fragment |
password, server, port, sni, and name |
Parse the server address and certificate name separately; don't use SNI as the server address. |
The share link below uses the reserved .invalid domain to demonstrate field mapping only. The port is 443, and %20 in the display name decodes to a space. This example maps a standard Trojan connection and does not cover other transport extensions.
trojan://[email protected]:443?sni=tls.example.invalid#Demo%20Trojan
proxies:
- name: "Demo Trojan"
type: trojan
server: edge.example.invalid
port: 443
password: "example-password"
sni: tls.example.invalid
This is a node snippet to add to a config, not a routing setup. When merging it into existing YAML, append the node to the existing proxies list; don't add a second top-level key with the same name. Then add Demo Trojan to the target group's candidate list. Quote the password and name explicitly as YAML strings, especially if they contain a colon, hash sign, or look like numbers.
Convert YAML to Share Links: Know What Gets Lost
- Choose what to export first. Extract only the nodes you need to migrate. Policy group order, rules, DNS, and TUN settings are not part of a single-node URI and cannot travel with a node list. If nodes come from a provider, the main YAML may contain only a reference; retrieve the node entries from a source you are authorized to access.
- Generate links for each protocol. Build URIs using a format supported by the receiving client, then percent-encode names, passwords, or query parameters as needed. If the client cannot recognize an extension field, flag the node for migration using the original config or a different client instead of silently dropping the field.
- Encode the list only if needed. If the destination accepts raw links, one per line, join them with line breaks. Encode the entire UTF-8 list in outer Base64 only if the destination requires a Base64 subscription. A locally encoded list is still static content, not a subscription URL that updates automatically.
To preserve the original routing behavior, migrate the full config and check core compatibility. Export share links or a Base64 list only when you need to move the same nodes to another client. These export types require different validation criteria.
Importing into a Client and Verifying the Conversion
A client's import interface and its core's capabilities are two separate things to check. For example, Clash Verge Rev can import and enable a full YAML config from the Subscriptions page; the exact buttons vary by version. If a version can import share links from the clipboard, that shows the client can parse them—it does not mean the core can read a block of Base64 text as a config. Conversely, a client that supports share links or node lists may not be able to read Clash policy groups and rules.
- First, check that the config parses. If mihomo is installed, run the command below in a terminal and replace the config path with your local filename. For external providers or resource references, also check that the runtime has the required files or access. A config check does not replace a connectivity test.
- Next, check the node count and references. For example, if the source list has 12 entries and the target core supports 11, you should be able to explain why the last one was not imported. If nodes appear but not in a policy group, first check whether the group references node names or provider names.
- Finally, test a node on its own. Select one converted node and test the connection. If it appears but won't connect, check the server, port, and authentication fields first, then TLS SNI, transport type, and path. For certificate errors, check the certificate name and system clock; disabling certificate verification is not a conversion step.
mihomo -t -f ./config.yaml
If you'll need regular updates, use the subscription format provided by the source for your target client. Local conversion is better suited to one-off migrations or troubleshooting compatibility issues. When merging nodes into the original config, use the routing rules syntax in the configuration reference to check that policy group names and rule references still match.