The Complete Clash Configuration Workflow: A Practical Guide from Subscription Links to Rule Strategies

2/20/2026 · 5 min

1. Obtaining and Importing Subscription Links

Clash's core functionality relies on proxy server node information, which is typically obtained through subscription links.

Obtaining a Subscription Link:

  • Purchase service from a reliable proxy service provider, who will provide a dedicated subscription link (usually starting with https://).
  • Some open-source projects or communities offer free public subscriptions, but security and stability are not guaranteed.

Importing the Subscription Link:

  1. In the Clash Client: Open Clash (e.g., Clash for Windows, ClashX, Stash), and navigate to the "Profiles" or "Subscriptions" page.
  2. Add Subscription: Click the "Add" or "Download" button and paste the complete subscription link into the input field.
  3. Update Configuration: After confirmation, Clash will automatically download and parse the subscription content, generating a configuration file (e.g., config.yaml).
  4. Activate Configuration: Select the newly downloaded configuration file from the list and set it as the active profile.

Security Note: The subscription link is your credential for accessing the service; do not share it. Update your subscription regularly to get the latest node list.

2. Understanding Proxy Modes and Policy Groups

Clash uses "Proxy Modes" and "Policy Groups" to precisely control traffic routing.

Proxy Mode:

  • Rule Mode: The most common mode. Decides traffic routing (direct, proxy, or reject) based on predefined rules (e.g., domain, IP, GeoIP).
  • Global Mode: All traffic goes through a specified proxy or policy group. Suitable for scenarios requiring a global proxy.
  • Direct Mode: All traffic bypasses the proxy.

Policy Groups: Policy groups are collections of proxy nodes. You can assign different groups to different types of traffic. Common policy group types include:

  • Select: Manually choose one node from the group to use.
  • URL-Test: Automatically tests the latency and availability of nodes in the group and selects the fastest one.
  • Fallback: Tests nodes in order and uses the first available one.
  • Load-Balance: Distributes traffic evenly among nodes in the group.

Configuration Example (YAML):

proxy-groups:
  - name: "🚀 Auto-Select"
    type: url-test
    proxies:
      - "HK-Node-01"
      - "JP-Node-02"
      - "US-Node-03"
    url: 'http://www.gstatic.com/generate_204'
    interval: 300

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

3. Detailed Rule Configuration

Rules are the core of Clash's operation in "Rule Mode". Rules are matched from top to bottom; the first match is executed.

Rule Format: TYPE,VALUE,POLICY

  • Type (TYPE): e.g., DOMAIN-SUFFIX, DOMAIN, IP-CIDR, GEOIP, MATCH (catch-all rule).
  • Value (VALUE): e.g., google.com, 192.168.1.0/24, CN.
  • Policy (POLICY): Specifies the traffic destination. Can be a specific proxy node, a policy group name, DIRECT, or REJECT.

Custom Rule Practices:

  1. Route Domestic Traffic: Set websites and IPs in mainland China to DIRECT for faster access.
  2. Proxy Specific Services: Direct specific streaming, social media, or work websites to dedicated high-speed policy groups.
  3. Block Ads: Use the REJECT policy to block advertising domains.

Rule Configuration Example:

rules:
  # Direct traffic for domestic domains and IPs
  - DOMAIN-SUFFIX,cn,DIRECT
  - GEOIP,CN,DIRECT
  # Proxy streaming services
  - DOMAIN-SUFFIX,netflix.com,🎬 Streaming
  - DOMAIN-SUFFIX,disneyplus.com,🎬 Streaming
  # Proxy common overseas services
  - DOMAIN-SUFFIX,google.com,🚀 Auto-Select
  - DOMAIN-SUFFIX,twitter.com,🚀 Auto-Select
  # Block ads
  - DOMAIN-SUFFIX,doubleclick.net,REJECT
  # Catch-all rule: Proxy all other unmatched traffic
  - MATCH,🚀 Auto-Select

It's recommended to use mature rule sets (like the Clash-rules project) as a base and fine-tune them according to personal needs.

4. Common Troubleshooting

If you encounter issues, follow these steps to troubleshoot:

  1. Cannot Connect / No Internet:

    • Check if the system proxy or TUN mode is correctly enabled.
    • Check if the proxy nodes in the configuration are valid (try manually testing latency on the "Proxies" page).
    • Check if the rules are too strict, causing essential traffic to be REJECTed or directed to a failed node.
  2. Some Websites Are Inaccessible:

    • Check if the rule for that website is correctly configured. Use Clash's "Connections" or "Logs" page to see the matching details for specific traffic.
    • It might be a DNS issue. Try enabling the dns section in the configuration or use fallback and nameserver to configure reliable DNS servers.
  3. Slow Speed:

    • Run a speed test for url-test type policy groups and switch to a faster node.
    • Check if domestic traffic that should be direct is mistakenly routed through the proxy due to improper rule configuration.
  4. Configuration Update Failed:

    • Check if the subscription link is valid and has not expired.
    • Check your network connection. Try manually accessing the subscription link in a browser to see if you can download the configuration file.
  5. Client Fails to Start or Crashes:

    • Check the configuration file syntax (YAML format) for correctness and proper indentation. Using an online YAML validator is recommended.
    • It might be a version incompatibility between the client and the configuration syntax. Try updating the client or using a more generic configuration format.

Related reading

Related articles

Tuic Protocol Practical Guide: Building High-Performance, Low-Latency Modern Network Proxy Services
Tuic is a novel proxy protocol built upon the QUIC protocol, designed for modern network environments to deliver superior performance and lower latency compared to traditional proxy protocols. This guide provides a comprehensive overview of Tuic's core advantages and working principles, along with a complete, step-by-step tutorial for building a Tuic proxy service from scratch, covering server configuration, client connections, and performance optimization techniques.
Read more
Deep Dive into the Clash Rule Engine: Technical Implementation from Policy Matching to Traffic Distribution
This article provides an in-depth analysis of the core architecture and workflow of the Clash rule engine. It details the complete technical implementation path from rule parsing and policy matching to final traffic distribution, and explores its design philosophy and optimization strategies in high-performance network proxy scenarios.
Read more
V2Ray Performance Tuning Guide: Best Practices for Configuration Parameters, Transport Protocols, and Network Environments
This article delves into the key elements of V2Ray performance tuning, covering optimization of core configuration parameters, strategies for selecting transport protocols, and adaptation schemes for different network environments, aiming to help users build efficient and stable proxy connections.
Read more
In-Depth Study of V2Ray Traffic Obfuscation: Strategies and Methods for Countering Deep Packet Inspection (DPI)
This article provides an in-depth exploration of V2Ray's core traffic obfuscation technologies, analyzing its strategies and implementation methods for countering Deep Packet Inspection (DPI). It details the working principles of key technologies such as WebSocket+TLS, mKCP, dynamic port, and protocol camouflage, offering configuration advice and best practices to help users build more covert and stable network connections.
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
Deep Dive into V2Ray Protocol: From VMess to XTLS, Building the Next-Generation Secure Proxy Network
This article provides an in-depth analysis of the V2Ray core protocol stack, from the classic VMess to the innovative XTLS. It explores its design philosophy, security mechanisms, and performance advantages, offering a technical guide for building efficient, stealthy, and censorship-resistant next-generation proxy networks.
Read more

Topic clusters

Clash Tutorial6 articlesSubscription Management5 articlesTroubleshooting3 articles

FAQ

What's the difference between Clash's 'Rule Mode' and 'Global Mode'? Which one should I use?
'Rule Mode' intelligently routes traffic based on preset rules, directing domestic websites directly and proxying foreign ones. It's the best choice for daily use, balancing speed and functionality. 'Global Mode' forces all traffic through the proxy, typically used for temporary scenarios requiring a global IP or as a temporary troubleshooting step when rule misconfiguration blocks website access. It's recommended to use 'Rule Mode' by default.
I updated my subscription link, but the node list hasn't changed. What should I do?
First, confirm in the profiles page that the new configuration was successfully downloaded and applied. Second, check if your subscription provider has actually updated the nodes. If the issue persists, try: 1) Completely deleting the old profile in the client and re-adding the subscription link; 2) Manually visiting the subscription link in your browser to see if the downloaded config file content is updated; 3) Checking if the client has a cache and try restarting the Clash client.
How do I configure a dedicated proxy for streaming services like Netflix?
The best practice is to create a dedicated policy group (e.g., type Select or URL-Test) and add nodes suitable for unlocking the streaming service. Then, in the rules section, add rules targeting the streaming service's domains, pointing to this policy group. For example: `- DOMAIN-SUFFIX,netflix.com,🎬 Streaming-Only`. This way, only traffic to Netflix uses the nodes in this group, while other traffic is handled by other rules, achieving precise routing.
Read more