How the three automatic proxy groups select nodes
url-test picks a node based on measured latency, fallback selects the first available node in the list, and load-balance distributes new connections across available nodes using a specified algorithm. These groups decide which outbound route handles a connection after a rule matches; they do not determine which domains use the proxy. For example, a DOMAIN-SUFFIX rule pointing to a primary-backup group first matches the domain suffix, then the group selects a node.
| Group type | Selection criteria | Best for |
|---|---|---|
url-test |
Candidate node latency, current node status, and switching tolerance | Choosing a faster route among exits in different regions or with similar purposes |
fallback |
The first available node in the list | Keeping a preferred exit and using a backup route for new connections only when it becomes unavailable |
load-balance |
The set of available nodes and the algorithm specified by strategy |
Distributing multiple independent connections across several exits |
The configuration behavior described below follows mihomo (Clash Meta). On Windows, macOS, or Linux, using Clash Verge Rev does not change node selection as long as it runs a mihomo core that supports these fields. For other clients, check the core and its version before confirming field support; the client’s product name does not tell you which core version it uses.
url-test: latency-based selection and switching tolerance
url is the HTTP or HTTPS address used to test candidate exits. The measured latency is how long that node takes to reach this address—not simply the network round-trip time to the node, and not a measure of download throughput. The test address should be reliably reachable through every candidate exit. If it is frequently redirected or restricted in a particular region, the results will also reflect differences at the test site.
interval: 300 is measured in seconds, so health checks run every 5 minutes. tolerance: 50 is measured in milliseconds; while the current node is still available, the group will not switch for a small latency improvement. For example, if the current node measures 130 ms and another measures 100 ms, the 30 ms difference is within a 50 ms tolerance, so the current node can remain selected. If that same candidate drops to 70 ms, the difference becomes 60 ms and exceeds the threshold. These figures illustrate the selection logic; they are not real-world route measurements.
fallback: primary-backup switching in list order
If the candidates are listed as Route-A, Route-B, and Route-C, B will not replace A just because it is faster while A is still considered available. Once A is marked unavailable, new connections prefer B; if B is also unavailable, the group tries C. When A recovers and a health check marks it available again, it becomes the preferred choice for subsequent connections. This is priority-based failover, not latency ranking.
Rank exits by your requirements before considering speed. For example, you might allow several exits for everyday use but prefer a fixed region for a particular service; in that case, list a backup route in the same region after the preferred one. If the service requires a strictly fixed exit IP and every backup would change it, a single exit is a better fit. Failover cannot move an established TCP session to another exit, so an application will usually need to reconnect after a route fails.
load-balance: distributing new connections
consistent-hashing: Calculates the selection from destination information. As long as the set of available candidates remains stable, the same destination will usually map to the same node. If a node fails or the candidate set changes, the result may change too, so this does not guarantee a fixed exit IP.round-robin: Assigns new connections to available nodes in rotation. It works well for independent requests but does not guarantee that every node will carry the same amount of traffic. Two connections can use very different amounts of bandwidth—for example, one carrying a short text response and another a large file.
Load balancing is not link aggregation. It does not split one long-lived connection across three exits, and when an application reuses an existing connection, the node is not selected again for every request. To check whether round-robin is working, look at the exits used by multiple independent connections rather than repeatedly refreshing a page that may reuse the same connection. For workloads that need a consistent exit throughout a session, use a fixed node or a primary-backup group instead of round-robin.
YAML examples for the three proxy groups
These are configuration snippets, not standalone subscriptions. Replace Route-A, Route-B, and Route-C with node names already present in your proxies configuration; each name must match exactly. If your subscription supplies nodes through proxy-providers, check the group’s use reference and the provider’s health-check separately. Do not put a provider name in proxies as if it were a node name.
proxy-groups:
- name: Lowest latency
type: url-test
proxies: [Route-A, Route-B, Route-C]
url: https://www.gstatic.com/generate_204
interval: 300
tolerance: 50
lazy: false
- name: Primary-backup
type: fallback
proxies: [Route-A, Route-B, Route-C]
url: https://www.gstatic.com/generate_204
interval: 300
lazy: false
- name: Connection distribution
type: load-balance
strategy: consistent-hashing
proxies: [Route-A, Route-B, Route-C]
url: https://www.gstatic.com/generate_204
interval: 300
lazy: false
rules:
- DOMAIN-SUFFIX,example.com,Primary-backup
- MATCH,Lowest latency
In this example, example.com and its subdomains use the primary-backup group; all other traffic uses the latency-based group. The connection-distribution group is defined but not referenced by any rule, so it will not handle traffic. To compare the groups, temporarily change the target of the example domain rule to Connection distribution. Keep the test domain and candidate list the same, and change only the group type. When adding this to an existing configuration, merge the relevant sections rather than creating duplicate top-level proxy-groups or rules sections. Put any new rule before broader rules that might match first.
All three examples set lazy: false so groups can run periodic checks even when no traffic is using them, making comparisons easier. In everyday use, there is no need to keep all three groups checking the same nodes on a schedule if you only use one. Only url-test uses tolerance here: the primary-backup group selects by list order, while the load-balancing group distributes connections according to strategy. Copying a tolerance value to those groups will not change how they select routes.
How to troubleshoot a proxy group that won’t switch
- Check the active configuration. Make sure the client has loaded the configuration you edited and is running in rule mode. Then check the connection log to see which rule and proxy group handled the test request. If no rule matched, check the domain and rule order before changing the tolerance.
- Check the health-check results. Confirm that all three candidates can reach the same test address through their respective exits. If all three fail, first check DNS resolution for the test domain, connection timeouts, and whether the test site is reachable. A successful check only confirms access to that address; it does not rule out problems with the target domain or UDP traffic.
- Test with new connections. To verify primary-backup behavior, you can temporarily make the preferred route unreachable in a test environment you control. After the health status updates, open a new connection and record whether the exit changes in A, B, C order. For the latency-based group, record the current and candidate latencies along with the tolerance. For load balancing, note which nodes handle multiple independent connections.
- Separate traffic capture from route selection. If a request does not appear in the client’s connection log at all, first check whether the app uses the system proxy or whether TUN is capturing its traffic. TUN changes how traffic enters the core; it does not turn a primary-backup group into a latency-testing group or replace domain rules.