Skip to main content

How to set up a proxy in Clash for Windows?

The following sections will walk you through the key steps and settings required to configure your proxy setup in Clash for Windows.

Setting up a proxy

  1. Go to General and enable System Proxy to route all system traffic through Clash.

    1.png

  2. Open the Profiles tab, right-click the active profile, and select Edit.

    2.png

  3. Fill in your proxy server details in the configuration fields.

    3.png

  4. Save using the floppy disk icon.

    4.png

Testing the connection

Navigate to the Proxies tab, select Global, and click Check next to your proxy. A green indicator confirms it's working. 

5.png

Routing traffic by domain in Clash for Windows

Clash for Windows lets you define custom routing rules to send traffic from specific domains through a proxy, while keeping everything else direct. To achieve this, you need to add two configuration blocks to your profile file: proxy-groups and rules.

  1. Open the Profiles tab and click the </> button next to your active profile to edit its raw config.

  2. After the existing proxies section, add the following configuration:

    proxy-groups:
    - name: Proxy
    type: select
    proxies:
    - Test
    - DIRECT

    rules:
    - DOMAIN-SUFFIX,youtube.com,Proxy
    - DOMAIN-KEYWORD,tiktok,Proxy
    - GEOIP,CN,DIRECT
    - MATCH,Proxy

Here is what each rule does:

Rule

Behavior

DOMAIN-SUFFIX,youtube.com,Proxy

Routes all YouTube subdomains through the proxy

DOMAIN-KEYWORD,tiktok,Proxy

Applies to any domain containing the word "tiktok"

GEOIP,CN,DIRECT

Sends China-geolocated traffic directly, bypassing the proxy

MATCH,Proxy

Sends all remaining traffic through the proxy by default

After saving, go back to the Proxies tab and switch the mode to Rule.

From this point on, Clash will route traffic according to your defined rules instead of a single global proxy, giving you precise control over which resources use the proxy and which connect directly.


Automatic Proxy Failover (Fallback)

The Fallback feature allows Clash to automatically switch between multiple proxies if one becomes unavailable. This is especially useful for maintaining stable connectivity without manual intervention.

To configure a fallback group, open your profile configuration again and add a new entry under proxy-groups:

proxy-groups:
- name: AutoProxy
type: fallback
proxies:
- Proxy1
- Proxy2
- DIRECT

Next, update your rules section so that remaining traffic uses this fallback group:

rules:
- MATCH,AutoProxy

Make sure that Proxy1 and Proxy2 exactly match the names defined in your main proxies section.

After saving the configuration, switch Clash to Rule mode again.

⚠️ Important: Your rules list must contain only one MATCH entry. If you're adding a fallback group, replace the previous - MATCH,Proxy line with - MATCH,AutoProxy. Clash will only apply the first MATCH rule it encounters and silently ignore any others.

Done! The proxy setup in Clash for Windows has been successfully completed.

If you have any questions or encounter any issues during setup, please contact our customer support team — we’ll be happy to help!

Did this answer your question?