With a single proxy node, a Clash proxy group is just a selector. But with multiple nodes, proxy groups unlock their real value: automatic latency-based selection, seamless failover, load distribution across nodes, and even multi-hop chains for advanced routing scenarios. This article covers all five of Clash's proxy group types — their design rationale and production configurations.

The Five Proxy Group Types

Clash supports five proxy group types, each suited to a different traffic management goal:

TypeSelection MethodBest For
selectManual user selectionPrimary proxy group; user switches manually
url-testAuto-select lowest latencyMultiple nodes; always use the fastest
fallbackTry in order; use first availableHigh availability; auto-switch on node failure
load-balanceRound-robin across nodesSpread concurrent connections; raise bandwidth ceiling
relayChain nodes in sequenceMulti-hop routing; hide exit IP

url-test: Automatic Best-Node Selection

A url-test group periodically sends HTTP requests to a test URL, measures each node's latency, and automatically switches to the lowest-latency node. interval controls how often tests run. tolerance sets the switching threshold — only switch when the current node's latency exceeds the best node's by more than tolerance ms, preventing unnecessary flapping.

url-test Group Configuration
proxy-groups:
  - name: Auto-Select
    type: url-test
    proxies:
      - node-us-01
      - node-eu-01
      - node-jp-01
    url: https://www.gstatic.com/generate_204
    interval: 300           # Test every 5 minutes
    tolerance: 50           # Switch only if latency delta exceeds 50ms

fallback: High-Availability Switching

Unlike url-test, fallback doesn't pick the fastest — it uses the first available node in order. Only when the current node fails the health check (timeout or unreachable) does it move to the next entry in the list. This is perfect for primary/backup setups: use node A normally; automatically switch to node B if A goes down.

fallback Primary/Backup Group Configuration
proxy-groups:
  - name: Primary-Backup
    type: fallback
    proxies:
      - node-primary      # Used first
      - node-backup-1     # Auto-switch if primary fails
      - node-backup-2     # Third option
    url: https://www.gstatic.com/generate_204
    interval: 60

load-balance: Spread Connections Across Nodes

A load-balance group distributes concurrent connections across multiple nodes, potentially raising aggregate throughput. Clash supports two strategy options:

  • consistent-hashing: all connections to the same destination domain/IP always use the same node. Ideal for services requiring IP consistency (logins, streaming sessions).
  • round-robin: each new connection rotates through the node list in turn. Most even distribution; best for stateless requests like bulk downloads.
load-balance Group Configuration
proxy-groups:
  - name: Load-Balance
    type: load-balance
    strategy: consistent-hashing
    proxies:
      - node-a
      - node-b
      - node-c
    url: https://www.gstatic.com/generate_204
    interval: 300
Load balancing does not stack bandwidth for a single connection. One video stream, for example, still runs through a single node. The benefit appears when multiple concurrent connections are active simultaneously — aggregate throughput can approach the sum of each node's bandwidth.

relay: Multi-Hop Proxy Chains

relay is Clash's most specialized group type. Traffic passes through nodes in the order listed in proxies — similar to Tor's multi-hop design. The final exit IP is the last node's IP. Common use cases include: routing through a nearby node first for reduced initial latency, then exiting through a geographically different node; or obscuring the true exit source by chaining multiple hops.

relay Chain Configuration
proxy-groups:
  - name: Relay-Chain
    type: relay
    proxies:
      - node-hop-1     # Traffic enters here first
      - node-hop-2     # Then exits from here
relay notes: All nodes except the last in a relay chain must support UDP over TCP (pure-UDP protocols like bare Hysteria2 can only be the final hop). Each additional hop adds latency — keep chains short.

Combining Group Types: A Production Template

In practice, proxy group types are best combined: a top-level select group lets the user choose between "Auto-Select" and a manually pinned node. Underneath, url-test and fallback subgroups provide automation while preserving manual override capability.

Production Proxy Group Template
proxy-groups:
  # Top-level manual selector
  - name: Proxy
    type: select
    proxies:
      - Auto-Select
      - Primary-Backup
      - node-us-01      # Can also pin a specific node

  # Auto latency sub-group
  - name: Auto-Select
    type: url-test
    proxies:
      - node-us-01
      - node-eu-01
      - node-jp-01
    url: https://www.gstatic.com/generate_204
    interval: 300
    tolerance: 50

  # Primary/backup sub-group
  - name: Primary-Backup
    type: fallback
    proxies:
      - node-us-01
      - node-eu-01
    url: https://www.gstatic.com/generate_204
    interval: 60