Clash Proxy Group Strategies: Selection, Load Balancing and Failover

2026-07-26 Advanced 12 min read

Proxy groups are one of the most flexible yet often overlooked components in Clash configuration. Many users simply rely on the config provided by their proxy service without understanding how proxy groups actually work. In reality, proper proxy group configuration is key to improving network stability and speed.

This guide covers every proxy group strategy type in Clash, from basic concepts to advanced nested usage, helping you truly master proxy group configuration.

What Is a Proxy Group?

A proxy group is a core component in the Clash configuration file that defines a set of proxy servers and how traffic should be distributed among them.

Simply put, a proxy group answers this question: When you have multiple servers available, which one should handle the traffic?

In the Clash configuration file, proxy groups are defined under the proxy-groups field:

proxy-groups:
  - name: "Proxy"
    type: select
    proxies:
      - Hong Kong Node 1
      - Hong Kong Node 2
      - Japan Node
      - US Node
Core Elements of a Proxy Group
  • name: The group name, referenced in routing rules
  • type: The strategy type, determining how traffic is distributed among proxies
  • proxies: List of proxy servers included, which can be specific nodes or other proxy groups

Clash supports 5 main proxy group types (plus relay), each with specific use cases. Understanding their differences is fundamental to optimizing your network configuration.

Select Strategy: Manual Choice

select is the simplest strategy type -- it gives the user full manual control over which node to use. This is what most proxy services use for their main "Proxy" group.

Basic Configuration

- name: "Proxy"
  type: select
  proxies:
    - Hong Kong Node 1
    - Hong Kong Node 2
    - Japan Node
    - US Node 1
    - US Node 2

Use Cases

Pro Tip for Select Groups

In the client UI, select groups are typically displayed as a list. Click to switch nodes. Place your most frequently used nodes at the top of the list to minimize switching effort.

URL-Test Strategy: Automatic Best Node Selection

url-test is the most practical automated strategy -- it periodically tests all nodes and automatically selects the one with the lowest latency. This is the go-to choice for most advanced users.

Complete Configuration Parameters

- name: "Auto"
  type: url-test
  proxies:
    - Hong Kong Node 1
    - Hong Kong Node 2
    - Japan Node
    - Singapore Node
  url: "http://www.gstatic.com/generate_204"
  interval: 300
  tolerance: 150

Parameter Details

Interval Configuration Warning

Do not set interval below 60 seconds. Frequent test requests consume node bandwidth and can actually degrade performance. The recommended value is 300 seconds (5 minutes), which balances responsiveness with efficiency.

The Lazy Parameter

lazy (default: true) controls whether inactive proxies are skipped during testing. If some nodes are rarely accessed, enabling lazy mode avoids unnecessary test overhead:

- name: "Auto"
  type: url-test
  proxies:
    - Hong Kong Node 1
    - Hong Kong Node 2
    - Japan Node
  url: "http://www.gstatic.com/generate_204"
  interval: 300
  tolerance: 150
  lazy: true

Fallback Strategy: Automatic Failover

fallback implements a primary-backup switching logic -- it tests nodes in list order and uses the first available one.

Basic Configuration

- name: "Fallback"
  type: fallback
  proxies:
    - Hong Kong Node 1
    - Hong Kong Node 2
    - Japan Node
    - US Node
  url: "http://www.gstatic.com/generate_204"
  interval: 300

How It Works

The fallback group performs health checks in order:

  1. First, test if "Hong Kong Node 1" is available
  2. If available, use it directly without testing subsequent nodes
  3. If unavailable, test "Hong Kong Node 2"
  4. Continue until an available node is found
  5. If all nodes are unavailable, use the first node in the list (even if unreachable)

Key Difference from url-test

Critical Distinction
  • url-test: Selects the node with the lowest latency (optimizes for speed)
  • fallback: Selects the first available node in the list (optimizes for priority)

If you want to prioritize Hong Kong nodes and only switch to Japan when Hong Kong is down, use fallback. If you want whichever node is faster between Hong Kong and Japan, use url-test.

Typical Use Cases

Load-Balance Strategy: Traffic Distribution

load-balance distributes traffic across multiple nodes, ideal for scenarios requiring high bandwidth or multi-user sharing.

Basic Configuration

- name: "LoadBalance"
  type: load-balance
  proxies:
    - Hong Kong Node 1
    - Hong Kong Node 2
    - Hong Kong Node 3
    - Japan Node 1
  url: "http://www.gstatic.com/generate_204"
  interval: 300
  strategy: consistent-hashing

Load Balancing Algorithms

Clash supports two load balancing algorithms:

Consistent Hashing

All requests to the same target domain (e.g., google.com) always go through the same node. Benefits include:

  • Stable connections without frequent node switching
  • Efficient use of persistent TCP connections
  • Avoids cookie loss or session interruption caused by node switching

Recommended: This is the best choice for most scenarios.

Round Robin

Requests are distributed sequentially across nodes -- the 1st request goes to node 1, the 2nd to node 2, and so on.

Characteristics:

  • Most even traffic distribution
  • May split requests for the same domain across different nodes
  • Can affect services that rely on persistent connections

Use case: When multiple users share the same proxy configuration, each user's traffic can be distributed to different nodes.

Load Balance Limitations

The load-balance strategy may not work well with some proxy services. Certain providers impose per-node rate limits or connection limits, and distributing across nodes might trigger risk controls. Test thoroughly before relying on it in production.

Relay Strategy: Chained Proxies

relay is the most specialized strategy type -- it routes traffic sequentially through multiple proxy nodes, forming a proxy chain. This is the only way to achieve "multi-hop proxying" in Clash.

Basic Configuration

- name: "Relay"
  type: relay
  proxies:
    - Japan Node (entry point)
    - Singapore Node (middle hop)
    - US Node (exit point)

How It Works

The data path is: Your device -> Japan Node -> Singapore Node -> US Node -> Target website

To the target website, the request appears to come from the US node's IP. However, both Japan and Singapore nodes can see your original encrypted traffic.

Use Cases

Performance Cost of Relay

Chained proxies significantly increase latency. Each additional hop adds approximately 20-100ms of delay. Chains with 3+ hops are generally unsuitable for everyday browsing and only make sense for extremely privacy-sensitive scenarios. Additionally, relay groups don't support url and interval parameters, as their health check mechanism differs from other strategies.

Relay Limitations

Nested Proxy Groups: Advanced Usage

A proxy group's proxies list can contain not just specific nodes but also other proxy groups. This is nested proxy groups -- the core mechanism for implementing complex routing logic.

Nested Structure Example

proxy-groups:
  # Bottom layer: regional groups
  - name: "Hong Kong Group"
    type: url-test
    proxies:
      - HK-01
      - HK-02
      - HK-03
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "Japan Group"
    type: url-test
    proxies:
      - JP-01
      - JP-02
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "US Group"
    type: url-test
    proxies:
      - US-01
      - US-02
      - US-03
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  # Middle layer: regional priority
  - name: "Asia-Pacific Auto"
    type: fallback
    proxies:
      - Hong Kong Group
      - Japan Group
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  # Top layer: final selection
  - name: "Proxy"
    type: select
    proxies:
      - Asia-Pacific Auto
      - US Group
      - Hong Kong Group
      - Japan Group

How Nesting Works

In the example above:

  1. "Proxy" group provides the final manual selection
  2. By default, it selects "Asia-Pacific Auto", which prioritizes Hong Kong Group (because fallback follows list order)
  3. If all Hong Kong nodes are unavailable, it automatically switches to Japan Group
  4. The user can also manually switch to "US Group" or any specific regional group
Nesting Best Practices

Keep proxy group nesting depth to no more than 3 levels. Excessive nesting increases configuration complexity and makes debugging difficult. It can also affect Clash's parsing performance.

Practical Example: Building a Smart Selection Strategy

Here is a complete production-ready configuration implementing "smart selection with manual fallback":

Design Goals

Complete Configuration

proxy-groups:
  # ===== Main Strategy Group =====
  - name: "Proxy"
    type: select
    proxies:
      - Auto Best
      - HK Auto
      - JP Auto
      - SG Auto
      - US Auto
      - DIRECT

  # ===== Auto Selection Layer =====
  - name: "Auto Best"
    type: fallback
    proxies:
      - HK Auto
      - JP Auto
      - SG Auto
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  # ===== Regional Auto Layer =====
  - name: "HK Auto"
    type: url-test
    proxies:
      - HK-01
      - HK-02
      - HK-03
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 100

  - name: "JP Auto"
    type: url-test
    proxies:
      - JP-01
      - JP-02
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 100

  - name: "SG Auto"
    type: url-test
    proxies:
      - SG-01
      - SG-02
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 100

  - name: "US Auto"
    type: url-test
    proxies:
      - US-01
      - US-02
      - US-03
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 150

  # ===== Streaming Specific =====
  - name: "Disney+"
    type: select
    proxies:
      - US Auto
      - US-01
      - US-02

  - name: "Netflix"
    type: select
    proxies:
      - HK Auto
      - JP Auto
      - US Auto

  # ===== Gaming Specific =====
  - name: "Game"
    type: url-test
    proxies:
      - HK-01
      - HK-02
      - JP-01
    url: "http://www.gstatic.com/generate_204"
    interval: 120
    tolerance: 50

Configuration Breakdown

Common Configuration Templates

Template 1: Simple Auto-Switch

For users who prefer fully automated operation:

proxy-groups:
  - name: "Proxy"
    type: url-test
    proxies:
      - Node 1
      - Node 2
      - Node 3
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 150

Template 2: Primary-Backup Dual Line

For users with clear primary and backup lines:

proxy-groups:
  - name: "Proxy"
    type: fallback
    proxies:
      - Primary Group
      - Backup Group
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "Primary Group"
    type: url-test
    proxies:
      - HK-01
      - HK-02
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "Backup Group"
    type: url-test
    proxies:
      - JP-01
      - SG-01
    url: "http://www.gstatic.com/generate_204"
    interval: 300

Template 3: Multi-Region Smart Selection

For advanced users with nodes across multiple regions:

proxy-groups:
  - name: "Proxy"
    type: select
    proxies:
      - Smart Auto
      - HK Auto
      - JP Auto
      - SG Auto
      - TW Auto
      - US Auto
      - DIRECT

  - name: "Smart Auto"
    type: url-test
    proxies:
      - HK Auto
      - JP Auto
      - SG Auto
      - TW Auto
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    tolerance: 80

  - name: "HK Auto"
    type: url-test
    proxies: [HK-01, HK-02, HK-03]
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "JP Auto"
    type: url-test
    proxies: [JP-01, JP-02]
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "SG Auto"
    type: url-test
    proxies: [SG-01, SG-02]
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "TW Auto"
    type: url-test
    proxies: [TW-01, TW-02]
    url: "http://www.gstatic.com/generate_204"
    interval: 300

  - name: "US Auto"
    type: url-test
    proxies: [US-01, US-02, US-03]
    url: "http://www.gstatic.com/generate_204"
    interval: 300
Configuration Advice

Replace the proxy names in these templates with your actual node names. Combine with Rule Provider for fine-grained traffic management across different strategy groups.