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

2/20/2026 · 5 min

Primary guide: The Definitive Clash Configuration Guide: A Complete Workflow from Subscription Import to Proxy Groups and Rule Management

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

Common Pitfalls in VPN Deployment and How to Avoid Them: A Practical Guide Based on Real-World Cases
VPN deployment appears straightforward but is fraught with technical and management pitfalls. Drawing from multiple real-world enterprise cases, this article systematically outlines common issues across the entire lifecycle—from planning and selection to configuration and maintenance—and provides validated avoidance strategies and best practices to help organizations build secure, efficient, and stable remote access and network interconnection channels.
Read more
VLESS Practical Deployment Guide: Building High-Performance Encrypted Tunnels in Restricted Network Environments
This article provides a detailed practical deployment guide for the VLESS protocol, focusing on configuring high-performance, low-latency encrypted proxy tunnels in environments with strict network censorship or limited bandwidth. It covers the complete configuration process for both server and client, TLS camouflage optimization strategies, and tuning techniques for specific network restrictions.
Read more
V2Ray Configuration in Practice: From Basics to Advanced, Building a Stable and Reliable Proxy Environment
This article provides a hands-on guide to V2Ray configuration from scratch, covering basic installation, core protocol setup, advanced features (like load balancing and dynamic ports), and security hardening, aiming to help users build a stable, efficient, and secure proxy environment.
Read more
Avoiding Subscription Pitfalls: What to Know About VPN Long-Term Contracts and Auto-Renewals
While VPN long-term contracts and auto-renewal features offer convenience and cost savings, they can also conceal potential pitfalls for consumers. This article provides an in-depth analysis of the pros and cons of long-term commitments, explains how auto-renewals work, and offers a practical checklist to help users manage their subscriptions effectively, avoiding unnecessary charges and disputes while enjoying the service.
Read more
Analyzing the V2Ray Ecosystem Toolchain: A Complete Solution from Configuration Generators to Traffic Monitoring
This article provides an in-depth analysis of the complete V2Ray ecosystem toolchain, covering various tools from configuration generation, client management, traffic monitoring to advanced feature integration, helping users build efficient, secure, and manageable proxy solutions.
Read more
VPN Health Diagnostic Manual: Identifying, Locating, and Fixing Common Connection Issues
This article provides a comprehensive VPN health diagnostic guide, helping users systematically identify, locate, and fix common VPN connection issues. Covering everything from basic checks to advanced diagnostics, including network settings, protocol configuration, server status, and client problems, it aims to restore stable and secure connections.
Read more

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