Proxy groups (proxy-groups) are the core scheduling layer of Clash's proxy architecture, responsible for deciding which node ultimately handles outbound traffic. A well-designed proxy group configuration achieves the optimal balance between speed, stability, and flexibility. This is the official Clash proxy group usage guide — complete configuration examples illustrate the appropriate use cases and officially recommended setup methods for all four proxy group types.
select: Manual Selection
The select type is the most basic proxy group. Users manually click to switch the active node or sub-group in the graphical interface. Its proxies list can mix specific proxy node names with the names of other proxy groups — this feature makes nested proxy group compositions possible.
proxy-groups:
- name: "🚀 Node Select"
type: select
proxies:
- "♻️ Auto Select" # reference another proxy group
- "🇭🇰 HK-01"
- "🇺🇸 US-01"
- DIRECT # built-in direct-connect policy
The select group typically acts as the top-level entry point, allowing users to manually switch to a different node or automatic policy at any time without modifying the config file.
url-test: Auto Speed Test
The url-test type periodically sends HTTP requests to the address specified in the url field, measures the latency of each node, and automatically switches traffic to the lowest-latency node.
- name: "♻️ Auto Select"
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300 # test interval in seconds
tolerance: 50 # tolerance: only switch if the new best node is 50ms faster
lazy: true # lazy: only test when traffic exists, saves resources
proxies:
- "🇭🇰 HK-01"
- "🇭🇰 HK-02"
- "🇭🇰 HK-03"
The tolerance parameter is very important. Without a tolerance setting, url-test may switch nodes frequently due to minor latency fluctuations when multiple nodes have similar latencies, causing connection interruptions. With a 50 ms tolerance, the group will only switch when the newly discovered best node is at least 50 ms faster than the current one, significantly improving stability.
fallback: Failover
The fallback type also tests nodes periodically, but its behavior differs from url-test: it always prefers to use the first available (successfully tested) node in the list, and only switches to the next node when the current one becomes unavailable (test fails or times out).
- name: "🛡️ Failover"
type: fallback
url: http://www.gstatic.com/generate_204
interval: 180
proxies:
- "🇭🇰 HK-01" # primary node, highest priority
- "🇯🇵 JP-01" # fallback node 1
- "🇸🇬 SG-01" # fallback node 2
fallback is ideal for scenarios requiring high stability, such as video calls and live streaming where connections must not be interrupted. When the primary node goes down, fallback will automatically switch to a backup node within the next test cycle (by default within 180 seconds), and switch back once the primary node recovers.
load-balance: Load Balancing
The load-balance type distributes newly established connections evenly across multiple nodes in the proxies list, making full use of each node's bandwidth. It is suitable for scenarios that need to establish a large number of simultaneous connections (e.g. multi-threaded downloads, bulk API requests).
- name: "⚖️ Load Balance"
type: load-balance
url: http://www.gstatic.com/generate_204
interval: 300
strategy: consistent-hashing # consistent hashing: routes same domain to the same node
proxies:
- "🇭🇰 HK-01"
- "🇭🇰 HK-02"
- "🇭🇰 HK-03"
The strategy parameter controls the distribution algorithm. consistent-hashing mode assigns all connections to the same target domain to the same node, preventing issues on websites that require a consistent IP (e.g. login state validation). round-robin mode cycles through nodes in order, and is better suited for stateless bulk request scenarios.
Proxy Group Architecture Design Recommendations
A well-designed proxy group architecture typically uses a layered approach: the top layer is a select group serving as the manually controlled master entry point for the user; the middle layer consists of url-test auto-speed-test groups organized by region or purpose; the bottom layer contains the actual proxy nodes. Split-routing rules point to the top-level group, allowing users to switch between automatic selection and a specific node at any time.
For streaming media unlocking, it is recommended to create a dedicated "Streaming" proxy group containing only nodes that support unlocking region-locked services (e.g. Netflix, ChatGPT), and point the relevant domains to this group in your rules. This way, your main workflow is unaffected — simply switch to the streaming group when you need it.