Clash Latency Tests Explained: Why Low Ping Doesn’t Mean Faster Downloads

Learn how url-test probes work and why the test URL matters. Understand why low latency can still mean slow loading, why timed-out nodes may work, and how to tune interval and tolerance.

What Does Clash Latency Testing Actually Measure?

In Clash clients powered by the mihomo core, a url-test group selects a node based on how long each candidate proxy takes to reach a specified URL. With an HTTPS URL, the result can be affected by connection setup, the TLS handshake, the route from the proxy’s exit to the destination, and the server’s response. Connection reuse can also affect the result. This isn’t an ICMP ping to the node address, and it doesn’t measure how long a webpage takes to render its first screen.

A common generate_204 endpoint returns HTTP 204 with no response body. It’s useful for checking whether a small request gets a timely response, but it doesn’t transfer enough data to estimate download bandwidth. 80 ms is not 80 Mbps, and it doesn’t mean the node will necessarily deliver more reliable video playback.

Manual Latency Tests and Automatic Node Selection Are Different

The “Latency Test” button in a client usually triggers a one-off probe. An automatic group, by contrast, checks node health using the active configuration’s url and interval. Which URL the button uses and which result it displays depend on the client’s implementation and any overrides. If the list shows A as faster but the automatic group still uses B, first compare the test URLs, result timestamps, and latency gap. Then check whether tolerance allows the group to stick with B.

Choosing a Test URL: Check Reachability, Then Test Your Workload

For automatic node selection, choose a URL that responds quickly and consistently and should be reachable through every candidate node. For example, https://www.gstatic.com/generate_204 normally returns 204 and works well for lightweight probes. It only represents the route to that endpoint—not the route to a code repository, cloud storage, or business system. If connections to the endpoint often fail from a particular region, the automatic group may rule out nodes that still work well for your actual workload.

  • To compare nodes fairly: Use the exact same URL, including its protocol, domain, and path. Don’t rank node A’s time to a 204 endpoint against node B’s time to a different site’s homepage.
  • To test a specific service: Test one of its key requests separately. The homepage may load quickly while the login API or static asset domain remains slow. Avoid using pages that require authentication for periodic probes; login state and redirects make the results hard to interpret.
  • Check the status code: For a probe expected to return 204, set expected-status: 204. If the server returns 403 or 429, the health check still fails even if the response arrives quickly. Check the core logs and endpoint response before increasing the timeout.

Low Latency, Slow Loading: Separate Wait Time from Transfer Time

A quick small response doesn’t mean a large file will download quickly. Congestion at the exit during peak hours or differences in the route to a destination’s CDN can make a node that leads on a 204 test fall behind during a sustained download. The reverse is also true: a node that downloads one file quickly won’t necessarily make every webpage load faster.

  1. First, make sure traffic is using the node you’re testing. Use a manual selection group to pin each node in turn, then check the client’s connection list to verify which rule matched the destination domain and which proxy chain was used. Send a new request after switching nodes; existing connections may continue using the previous exit.
  2. Break down the webpage requests. In Chromium, open Developer Tools → Network, check “Disable cache,” and reload the page. Open the slow request and inspect Timing. Compare Waiting for server response (time to first byte) with Content Download (time to receive the response body). If the wait is long, investigate the route, connection, and server response. If the download takes a long time, check sustained transfer alongside the response size.
  3. Compare throughput using the same resource. Choose a fixed-size file you’re authorized to access. On the same device and at roughly the same time, switch nodes and run three tests per node. Compare the median duration and record failures too. Confirm that data was actually transferred so cached responses don’t skew the results.

Example: Node A takes 68 ms to probe the 204 endpoint, while B takes 112 ms. But for the same 20 MiB file, A takes 20 seconds and B takes 5. Their average transfer rates are 1 MiB/s and 4 MiB/s, respectively. There’s no contradiction: A completes the small request faster, while B transfers the large file faster. These figures are an illustrative calculation, not measured node rankings.

A Probe Times Out but the Site Still Works: Verify Both Requests Use the Same Route

An automatic group tests candidate proxies against its probe URL. A browser request to a real site also passes through the active routing rules. If the probe times out but a webpage opens, the webpage may have matched DIRECT, used a different policy group, or gone through another node in the group. Enabling TUN only means traffic can be captured through a virtual network interface; it doesn’t tell you which exit a particular connection used.

  1. Check the rule and connection. Find the new request in the connection list and confirm its rule, policy group, and final proxy. A webpage loading without using the node under test doesn’t prove that node works.
  2. Compare the probe endpoint with the actual destination. After confirming that the service works through the same node, check the probe domain’s connection, TLS handshake, and response status. The timeout may be specific to that endpoint. If the interface groups different errors under a generic failure label, use the core logs to identify the cause.
  3. Only then adjust the timeout. If the logs show that the probe really exceeds timeout: 5000, temporarily try 8000 and observe the results. A longer wait can distinguish “no response within five seconds” from “response took longer,” but it won’t fix certificate errors or increase bandwidth. Don’t treat a one-off success as proof that the connection is stable again.

Tuning interval and tolerance

interval sets how often periodic checks run, in seconds. tolerance sets the latency difference, in milliseconds, that an automatic group allows before switching away from its current usable node. timeout sets the maximum wait for a single probe, also in milliseconds. They answer three different questions: “How often should it test?”, “How much faster must another node be to justify a switch?”, and “How long should one probe wait?”

This snippet adds an automatic group to an existing configuration; it is not a complete subscription. Hong Kong A and Japan B must exactly match node names under proxies in your configuration. If a top-level proxy-groups already exists, add only the group entry; don’t create another top-level key with the same name. The values are examples, not client defaults.

proxy-groups:
  - name: Auto Select
    type: url-test
    proxies:
      - Hong Kong A
      - Japan B
    url: https://www.gstatic.com/generate_204
    expected-status: 204
    interval: 300
    tolerance: 50
    timeout: 5000
    lazy: true
  • Start with a 300-second interval. Observe a few check cycles before adjusting it. With many candidates and stable connections, try 600 seconds; if you need to catch peak-hour changes sooner, try 180 seconds. A shorter interval increases probe frequency but won’t speed up downloads already in progress. With lazy: true, unused groups can skip periodic checks, so don’t assume a 300-second interval means the interface refreshes exactly every five minutes.
  • If nodes switch too often, check the latency gap first. Suppose A is usable at 106 ms and B is at 79 ms. The 27 ms difference is below 50 ms, so the group can stay on A. If A rises to 160 ms while B remains at 79 ms, the 81 ms difference exceeds the tolerance, and new connections may use B. Tolerance isn’t a maximum allowed latency or a grace period for a failed node.
  • If nodes come from a proxy provider, check the provider settings too. When a group uses use to reference proxy-providers, configure health checks for those nodes under the corresponding provider’s health-check. Changing only the group’s interval won’t change the provider’s check frequency.

After saving, make sure the client has reloaded the configuration. Then confirm that the automatic group appears and that the target traffic actually uses it. Adding a group alone won’t affect traffic if your rules or a parent policy group still point to the previous exit. If your subscription client supports local overrides, make these changes in the override layer and verify the active values again after refreshing the subscription.

Download Clash