Pasting a subscription link into a proxy client looks like one action. It is actually four, and each one has a different failure signature. Most import guides list the steps; almost none say what the step outputs, which is why "import failed" is unactionable.

This is the output of each step, and how to inspect it yourself before touching any setting.

Step 1 — fetch: the URL becomes bytes

The client issues an HTTP GET. What it gets back is not necessarily a subscription.

Four things can come back with a 200:

What you got How to tell
A node list, base64 long string, = padding, decodes to text
A Clash YAML starts with port: / proxies:
An HTML page contains <!DOCTYPE or <html
An empty body size_download is 0

The last two are the interesting ones, because the client will still try to parse them.

curl -s -o /tmp/sub -w '%{http_code} %{size_download} %{content_type}\n' "$URL" head -c 120 /tmp/sub 

A 200 with text/html and 4 KB of body is a panel login page or an error page served with the wrong status. Browsers hide this because they render the page and you see the error message. A client only sees bytes.

If the response is HTML and you did not expect it, do not debug the client. The URL points at a web page, not at a subscription endpoint.

Step 2 — decode: bytes become text

Base64 subscriptions are decoded before parsing. The failure mode here is specific: the string contains characters outside the base64 alphabet because it was URL-safe base64 (- and _ instead of + and /), and the decoder silently stops at the first such character.

The symptom is a truncated node list: you import 40 nodes and the last 3 are missing, or you import 0 and see a parse error on line 1.

# try both alphabets; a valid payload decodes identically echo "$B64" | tr '_-' '/+' | base64 -d 2>/dev/null | head -5 

If the strict decode fails but the translated one succeeds, the panel is emitting URL-safe base64. That is legal; the client just has to handle it.

Step 3 — parse: text becomes fields

Now the payload is text and the client needs structured nodes. Two distinct failures live here, and they produce similar messages.

Format mismatch. A base64 node list is not a YAML config. Some clients accept both, some only the one matching the selected profile type. If you imported a base64 link while the profile type says "Clash", the parser fails on the first line and reports a YAML error — which is technically correct and completely misleading.

Empty collection. A syntactically valid config can contain zero nodes:

proxies: [] proxy-groups: [] rules: [] 

This parses cleanly. The client reports "no nodes" or "no proxy available", and people go looking for a network problem. There is none: the account has no nodes provisioned.

grep -c '^ - name:' /tmp/sub # 0 means the parse succeeded and there is nothing to use 

Step 4 — apply: fields become a running config

The last step writes the parsed config into the client's own state and reloads the core. Failures here are about identity, not content:

  • a node name that collides with an existing group name
  • a proxy-group that references a provider name which does not exist in the file
  • a port already bound by the previous instance

The giveaway is that the import appears to succeed and then the client reverts to the old node list after a restart. That is not a fetch problem; the fetch worked, the write did not survive the reload.

The order that actually saves time

Check in this order, and stop at the first step that produces something unexpected:

  1. curl -w on the URL — status, size, content type
  2. head -c 120 on the body — is it YAML, base64, or HTML
  3. decode and grep -c 'name:' — are there nodes at all
  4. only then open the client

Three of the four steps can be checked without the client running. Doing them first turns "import failed" into a specific, one-line diagnosis.

The same four checkpoints, with the client-side messages each one produces, are mapped out per step in importing a subscription into Clash Verge Rev and v2rayN. If you would rather convert a base64 link into Clash YAML without uploading it anywhere, this converter runs entirely in the browser.

Twenty of the error strings these four steps emit, sorted by which step blames which, are collected in one reference table — useful when the message names a stage you did not expect.