· Deep Dive · 8 min read

Clash Latency Test: Test URLs, Timeouts, and Real-World Speed

Learn how url-test URLs, timeouts, and handshakes affect latency readings—and why milliseconds in the dashboard don’t predict download speeds, packet loss, or peak-hour performance.

What an 80 ms Dashboard Reading Measures

url-test measures how long a brief HTTP probe takes over the proxy route. A reading of 80 ms means that, for this sample, the core sent a request to the test URL through the specified proxy and received a response in 80 milliseconds. It is not an ICMP ping to the node’s IP, nor a speed estimate based on downloading a file.

How Handshakes and Responses Affect the Reading

An initial probe to an HTTPS URL may involve resolving the node’s hostname, establishing a proxy connection, completing the proxy protocol handshake, performing the destination’s TLS handshake, and waiting for an HTTP response. Where the destination hostname is resolved and which connections can be reused depend on the proxy protocol and core implementation. A fresh connection and a reused connection can produce different results for the same URL, so don’t treat the difference as network-path latency.

mihomo’s top-level unified-delay option defaults to false. When set to true, the core performs two probes to reduce the effect of connection handshakes when comparing latency. This does not convert the result into pure network round-trip time. Before comparing two configurations or clients, make sure they use the same core, test URL, and option value. The dashboard may also show an earlier probe result; an 80 ms reading that hasn’t been refreshed says nothing about the current route.

Choosing a Test URL, Timeout, and Switching Tolerance

Use a stable HTTPS endpoint with a small response body. A URL expected to return 204 No Content works well for connectivity checks, but reaching the test site only confirms that the route can access that site. The website you actually need may be in another region, use a different CDN, or apply different access restrictions to proxy traffic.

Here’s a mihomo proxy group snippet. The two names under proxies must match nodes defined in the configuration. These values are examples, not defaults for every client.

proxy-groups:
  - name: Auto Select
    type: url-test
    proxies:
      - Node-A
      - Node-B
    url: https://www.gstatic.com/generate_204
    expected-status: 204
    interval: 300
    timeout: 5000
    tolerance: 50
  • url sets the test URL. Keep it fixed when comparing nodes. If several nodes time out against the same URL, try another known-good endpoint and record the results separately before and after changing the URL.
  • expected-status: 204 requires the response status to match the expected value. Receiving a login page or error page does not count as a successful probe. This field is part of the mihomo configuration example; check compatibility separately for older Clash cores.
  • timeout: 5000 gives each check a 5-second time limit. A timeout is not a valid response that took “5000 ms.” If you start a manual speed test in the client, it may use a different time limit from the proxy group.
  • interval: 300 sets the interval between periodic checks in seconds; it is not a request timeout. With lazy checks enabled, unused groups may not refresh continuously at this interval.
  • tolerance: 50 sets the switching tolerance for automatic selection, in milliseconds. If the current node is at 110 ms and a candidate is at 85 ms, a 25 ms difference usually won’t trigger a switch while the current node is healthy. Tolerance is not a maximum acceptable latency.

Why Lower Latency Can Mean Slower Downloads

Short requests mainly show how quickly a response arrives; sustained downloads depend on how much data comes in each second. Congestion on a shared exit during peak hours, retransmissions on a long-lived connection, or per-connection speed limits on the server can all slow large downloads while short requests remain fast. Conversely, a cross-region route may take longer to complete its handshake but still finish a download sooner if it has enough sustained bandwidth.

Assume the same 100 MiB file is downloaded at the same time
Node Short-request latency Download time Average throughput
A65 ms50 seconds2 MiB/s
B180 ms10 seconds10 MiB/s

Average throughput here is calculated by dividing file size by download time; these figures are not measured node rankings. A downloader’s MiB/s is binary megabytes transferred per second, while an ISP’s Mbps is millions of bits per second. 10 MiB/s is about 84 Mbps of effective data throughput, so the two on-screen figures aren’t directly comparable.

Short probes can’t directly measure packet loss either. For example, if 2 out of 10 probes time out, all you can conclude is that 2 probes failed under those conditions. TCP retransmissions may hide packet loss but make requests slower; DNS failures, refused connections, or problems with the test site can also cause probe failures. Calling this result a “20% packet loss rate” can send troubleshooting in the wrong direction.

A Node Times Out, but Websites Load: How to Troubleshoot

  1. Check which proxy exit is actually being used. Refresh a site you normally use, then check the client’s connection list for the destination hostname, matched rule, and actual proxy route. The page may have gone through DIRECT or a different node, or it may simply be cached. A page loading successfully doesn’t prove that the node showing a timeout is working.
  2. Try a different URL through the same exit. If the site you need is reachable through that node but the original test endpoint keeps failing, try another trusted HTTPS endpoint and make sure its expected status code is correct. If only the original endpoint fails, start by checking DNS resolution and reachability to that domain through the proxy exit.
  3. Use logs to identify the failure stage. A node hostname lookup failure, dial failure, TLS error, and unexpected HTTP status each call for a different fix. If the logs show only a timeout, temporarily raise the limit from 5000 ms to 8000 ms for a retest and see whether a response arrives consistently. This changes the timeout threshold; it doesn’t fix the route.
  4. Check app traffic interception separately. If the core’s probe succeeds but the browser fails, first check whether the browser’s new request appears in the connection list. If there’s no entry, check the system proxy, browser proxy settings, or TUN routing scope. If there is an entry, inspect the matched rule and proxy exit. A probe initiated by the core doesn’t prove that an app’s traffic is being routed through TUN.

Choosing a Node at Peak Hours: Compare Latency, Failures, and Throughput

Pick two candidate nodes and test them on the same device and network, one round per node. For example, use local time at 3:00 p.m. and 9:00 p.m., and run 10 short probes to the same URL each round. Record the number of successful probes, the median of successful readings, and the slowest reading; list timeouts separately. If A succeeds 8 times with a 75 ms median and B succeeds 10 times with a 130 ms median, don’t conclude that A is better for evening use just because 75 is less than 130.

Next, choose a fixed static file that can be downloaded, such as a 100 MiB test file. Switch the policy group used by your actual workload to the node under test, start a new download, and confirm the proxy exit in the connection list. Alternate A, B, A, B to avoid competing for local bandwidth with simultaneous downloads. Make sure the file is transferred again each time, and record its size and total download time. Then check with the apps you actually use: look for buffering in video, dropouts in calls, and repeated stalls on interactive pages.

For everyday routing, url-test can weed out unreachable nodes and reduce manual switching. For bandwidth- or stability-sensitive tasks such as large downloads and meetings, use select to pin a recently tested proxy exit. If your workload requires UDP, test the UDP route in the actual app; HTTPS probe times are no substitute.

Download Clash