DEV Community

dong liu
dong liu

Posted on

A free node subscription is rarely 'broken'. Four commands tell you which layer failed.

Every free subscription list eventually stops working. The problem is that "stopped working" covers four completely different failures, and people usually treat all four the same way: they delete the subscription, grab another one, and repeat the cycle a week later. Two minutes of measurement tells you which one you actually have — and whether re-importing can possibly help.

Here is the order I check things in, cheapest first.

1. Is the subscription URL still serving a list, or is it serving an error page?

The single most common "dead subscription" is not dead at all — the endpoint returned HTML, and your client saved it as a config.

curl -sS -D- -o /tmp/sub.txt "$SUB_URL" | head -20
wc -c /tmp/sub.txt
head -c 200 /tmp/sub.txt
Enter fullscreen mode Exit fullscreen mode

What to look for:

  • content-type: text/html — you got a web page, not a list. Captive portal, Cloudflare interstitial, or a 404 page rendered by the CDN.
  • A body starting with <!DOCTYPE or <html — same thing.
  • content-length: 0 — the generator is up but has nothing to hand out.
  • A body that is a single base64 blob — normal for v2ray-style links, and it decodes to one URI per line.

If the body looks like base64 and won't decode, check for a BOM or trailing newline garbage:

tr -d '\r\n ' < /tmp/sub.txt | base64 -d 2>/dev/null | head -3
Enter fullscreen mode Exit fullscreen mode

A list that decodes to zero vmess:// / vless:// / ss:// lines is an empty list dressed up as a successful response. Clients happily import it and show you an empty group, which reads as "the subscription is broken" when the truth is "there was nothing in it".

2. Do the nodes resolve and accept a TCP connection?

Take three hosts out of the list and test them directly, outside the client. This separates "the endpoint is gone" from "the client is misconfigured".

for h in host1.example.com host2.example.com host3.example.com; do
  echo "== $h"
  getent hosts "$h" || echo "  DNS: no answer"
  timeout 5 bash -c "</dev/tcp/$h/443" && echo "  TCP 443: open" || echo "  TCP 443: refused/timeout"
done
Enter fullscreen mode Exit fullscreen mode

Three outcomes, three different problems:

  • DNS fails. The provider rotated domains. Nothing you do client-side fixes it; the subscription needs the new domain.
  • DNS resolves but TCP times out. Either the port is filtered from your network, or the host is down. Test the same host from a second network (phone hotspot) before concluding — a filtered port from one ISP is common and looks identical to a dead server.
  • TCP opens. The server is alive. Whatever is failing is above layer 4: protocol parameters, UUID, SNI, or the client.

3. Does the TLS handshake complete with the SNI the config asks for?

For anything running TLS (VLESS+Reality, Trojan, VMess+WS+TLS), a working TCP port means nothing if the handshake fails — CDNs answer TCP and then drop the connection.

openssl s_client -connect host:443 -servername sni.in.config -brief </dev/null 2>&1 | head -15
Enter fullscreen mode Exit fullscreen mode

If s_client completes and prints a certificate while your client still fails, the config and the server disagree about something the handshake doesn't cover: path, Host header, or the Reality public key. Those are all in the same place — the URI or YAML block — so diff one working node against one failing node from the same subscription. Same provider, same day, one works: the difference is always in the config text, never in "the network".

4. Is it the node, or the route to the node?

This is where most people stop measuring and start guessing. A node can be perfectly alive and still be unusable at 21:00 because the transit path is congested.

mtr -rwzbc50 -T -P 443 host.example.com
Enter fullscreen mode Exit fullscreen mode

Read the last few hops, not the first ones. Loss that appears at hop 3 and stays flat is your local link. Loss that only appears in the final hop or two is the international transit, and it will change by hour. Packet loss measured with ICMP is close to meaningless on a lot of transit gear — always use -T -P 443.

Then, on the far side, look at the socket itself:

ss -ti dst :443 | head -20
Enter fullscreen mode Exit fullscreen mode

Sustained retrans above roughly 0.5% with healthy rtt means the path is dropping, not the server. High rtt with no retransmits means the node is just far away — that's a routing choice, not a fault.

The part that actually saves time

Free lists are mostly populated with nodes that were alive when they were submitted. The failure mode is not "the list broke", it's "the list is 60% stale and you can't tell which 40% is real". So the useful workflow is not re-importing more lists, but testing the ones you have on a schedule and keeping the 3–5 that survive:

# quick liveness sweep: keep hosts that answer TLS within 3s
while read -r h p; do
  timeout 3 openssl s_client -connect "$h:$p" -brief </dev/null >/dev/null 2>&1 \
    && echo "keep $h:$p" || echo "drop $h:$p"
done < candidates.txt
Enter fullscreen mode Exit fullscreen mode

Two things worth knowing about this cycle:

  • Test from the network you'll actually use. A node that passes a datacenter test can be unreachable from a residential line, and vice versa.
  • Test twice, hours apart. A single pass tells you it worked once. Free nodes fail in bursts, usually in the evening, and the only way to catch it is a second sample.

I keep a daily log of exactly this — which nodes from a batch passed a double-ended request test, which download completed, which region the exit actually resolved to — because the useful signal is not "it works now", it's "how often does this batch work". The published batches and their per-day results are at jiedianshouce.com/free-nodes.

If you're debugging a client rather than a subscription, the layer-by-layer version of this checklist — what each failure looks like from inside the client — is at the troubleshooting index.

The short version: when a subscription "stops working", measure the URL, the port, the handshake, and the route — in that order, and stop at the first one that fails. Nine times out of ten you stop at step 1 with an HTML error page.

Top comments (0)