Mastering Clash: A Comprehensive Guide to Subscription Setup, Proxy Groups, and Rule Management

2/20/2026 · 4 min

Mastering Clash: A Comprehensive Guide to Subscription Setup, Proxy Groups, and Rule Management

Clash is a powerful network proxy tool renowned for its flexible rule system and excellent performance. Mastering its core functionalities is key to building an efficient proxy environment.

1. Subscription Configuration and Management

Subscriptions are the primary method for Clash to obtain proxy server information. Proper configuration is the first step.

1.1 Importing a Subscription Link

  • Obtain the Subscription Link: Get a Clash-formatted subscription link (usually a .yaml file or a hosted URL) from your service provider.
  • Import in Client: In your Clash client (e.g., Clash for Windows, ClashX, Stash), locate the "Config" or "Profiles" page.
  • Add Subscription: Click "Add" or "Download from URL", paste your subscription link, and give it a name.
  • Update Subscription: Regularly click the "Update" button on the config page to fetch the latest server and rule information.

1.2 Configuration File Breakdown

A subscription link is essentially a YAML configuration file containing:

  • proxies: Defines all available proxy server nodes.
  • proxy-groups: Defines policy groups for organizing nodes and selection logic.
  • rules: Defines traffic routing rules, determining which proxy or direct connection to use for different traffic.

2. Building and Using Proxy Groups

Proxy groups are the core of Clash's traffic routing logic, allowing users to group proxy nodes and set different selection policies.

2.1 Common Proxy Group Types

  • Select: Manually choose a node from the group.
  • URL-Test: Automatically tests latency/availability of all nodes in the group and selects the fastest one.
  • Fallback: Tests nodes in order and uses the first available one.
  • Load-Balance: Distributes traffic among nodes in the group based on a strategy.
  • Relay: Chains traffic through multiple nodes in the group sequentially.

2.2 Proxy Group Configuration Example

proxy-groups:
  - name: "🚀 Auto-Select"
    type: url-test
    proxies:
      - HK-Node-1
      - SG-Node-2
      - JP-Node-3
    url: 'http://www.gstatic.com/generate_204'
    interval: 300

  - name: "🎬 Streaming"
    type: select
    proxies:
      - 🚀 Auto-Select
      - DIRECT
      - US-Streaming-Node
      - HK-Node-1

  - name: "📱 Daily Use"
    type: fallback
    proxies:
      - 🚀 Auto-Select
      - DIRECT
      - HK-Node-1

3. Deep Dive into the Rules System

Rules determine how network traffic is handled. Clash matches rules from top to bottom, executing the corresponding action upon the first match.

3.1 Rule Types and Syntax

Basic syntax: type,parameter,policy-group

  • DOMAIN-SUFFIX: DOMAIN-SUFFIX,google.com,🚀 Auto-Select
  • DOMAIN-KEYWORD: DOMAIN-KEYWORD,spotify,🎬 Streaming
  • DOMAIN: DOMAIN,www.netflix.com,🎬 Streaming
  • GEOIP: GEOIP,CN,DIRECT (Directs traffic for Chinese IPs)
  • IP-CIDR: IP-CIDR,192.168.1.0/24,DIRECT (Directs LAN traffic)
  • MATCH (Default Rule): MATCH,📱 Daily Use (Traffic not matching any above rule uses this policy)

3.2 Rule Management Tips

  • Rule Priority: Place the most specific and frequently used rules at the top.
  • Leverage Rule Providers: Subscribe to or import third-party rule sets (e.g., Reject ads, streaming rules) to simplify configuration.
  • Local Rules: Add personal custom rules at the end of the config file; they have higher priority than rule providers.

4. Troubleshooting Common Issues

  1. Subscription Update Fails: Check your internet connection; verify the subscription link is valid; try changing the link protocol (e.g., test with http instead of https).
  2. Connected but No Internet: Check if System Proxy or TUN mode is enabled; verify rules are correct, especially that the MATCH rule points to a usable proxy group.
  3. Slow or Unstable Speed: Try changing the test URL for URL-Test; remove suspected faulty nodes from proxy groups; check your local network.
  4. Certain Websites/Apps Not Proxied: Check if rules cover the website's domain; try adding more specific rules for that app or site.
  5. Configuration File Error: Use an online YAML validator to check the file format; ensure indentation is correct.

By deeply understanding the three core pillars—Subscriptions, Proxy Groups, and Rules—you can unlock Clash's full potential to create a smart, personalized network proxy environment.

Related reading

Related articles

The Ultimate Showdown of Streaming VPNs: An In-Depth Comparison of Speed, Stability, and Unblocking Capabilities
This article provides a comprehensive comparison of leading streaming VPNs, conducting in-depth testing and analysis across multiple dimensions including connection speed, network stability, unblocking success rate, privacy security, and cost-effectiveness. It aims to offer users an objective and practical guide to selecting the optimal tool for enjoying global streaming content.
Read more
V2Ray Deployment Practical Guide: Configuring High-Performance, Anti-Interference Proxy Services on Cloud Servers
This article provides a detailed practical guide for deploying V2Ray, instructing users on how to set up high-performance, anti-interference proxy services on mainstream cloud servers. It covers key steps including server selection, V2Ray core configuration, TLS and WebSocket obfuscation, performance optimization, and security hardening, aiming to help users build stable and reliable network channels.
Read more
Market Segmentation and Subscription Diversion: The Business Value and Technical Implementation of Precise User Targeting
This article explores how market segmentation and subscription diversion strategies can precisely target different user groups in subscription services and network acceleration fields to maximize business value. It analyzes the core business logic and details the key technical implementations required for precise traffic diversion, including intelligent routing, policy group configuration, and user behavior analysis.
Read more
VPN Performance Tuning in Practice: A Complete Guide from Protocol Selection to Network Configuration
This article provides a comprehensive, practical guide to VPN performance tuning, covering the complete process from core protocol selection and server optimization to client and network environment configuration. Through systematic adjustments, users can effectively increase connection speeds, reduce latency, and enhance stability to meet the demands of various scenarios such as remote work, secure access, and streaming.
Read more
A Gamer's Guide to VPN Selection: Professional Analysis Balancing Low Latency, Stability, and Security
This article provides a professional guide for gamers on selecting a VPN, offering an in-depth analysis of how to balance the three core needs of low latency, connection stability, and network security. We will explore the practical application scenarios of VPNs in gaming, key performance metrics, and provide provider recommendations and configuration tips based on different game genres.
Read more
VMess Traffic Pattern Analysis and Countermeasures: Deployment and Optimization Strategies in Complex Network Environments
This article provides an in-depth analysis of the core traffic characteristics of the VMess protocol and explores methods for identifying and disguising these patterns in increasingly complex network censorship environments. It offers a systematic strategy from basic deployment to advanced optimization, covering key technologies such as transport layer configuration, dynamic ports, TLS camouflage, and WebSocket integration. The goal is to help users build more stable and covert proxy channels to counter challenges like Deep Packet Inspection (DPI) and active probing.
Read more

Topic clusters

Clash Tutorial6 articlesSubscription Management5 articlesProxy Configuration3 articlesProxy Groups2 articles

FAQ

What's the difference and connection between 'Rules' and 'Proxy Groups' in Clash?
「Proxy Groups」 are containers and selectors for proxy nodes. They define "which nodes are available" and "what logic (e.g., auto-select, fallback) to use for choosing a node." 「Rules」 are the criteria for traffic routing. They define "what kind of traffic (e.g., accessing a certain domain, coming from a certain IP)" should be handed over to "which proxy group (or DIRECT, REJECT)." Simply put, rules are the judge (determining where traffic goes), and proxy groups are the executors (providing the specific proxy resources).
Why do my custom rules and proxy group settings disappear after updating my subscription?
This is because most Clash clients, when updating a remote subscription, overwrite the local configuration file with the complete file downloaded from the server. To preserve custom settings, two common methods are: 1) Use the client's "Edit" feature to modify the local config file and periodically manually merge new node information from the subscription. 2) Use the `proxy-providers` and `rule-providers` features in the config file to separate node/rule subscriptions from your local core configuration, so updating subscriptions won't overwrite your main settings.
Where should the MATCH rule be placed in the rule list?
The `MATCH` rule must be placed at the **very end** of all rule lists. It acts as the default rule (catch-all rule), handling all traffic that hasn't been matched by any preceding rule. If the `MATCH` rule is placed earlier, all subsequent rules become ineffective because all traffic would already be captured and processed by the `MATCH` rule in the first step.
Read more