What Clash Is, and What Problems It Solves
In short, Clash is a proxy client built around "rule-based routing": it checks where each network request is headed, then decides how to handle it based on the rules you've set up — local and regional services connect directly with zero speed impact, services that need a proxy get routed to the right node, and ads or malicious domains are blocked locally before the request even goes out. The whole process is automatic — you won't notice anything "switching" in the background; the rules have already decided which path each site takes before you even load it.
It's a fully open-source, cross-platform project, with clients or cores available for Windows, macOS, Linux, Android, and iOS, all sharing the same config file format — so switching devices doesn't mean learning a new setup. To get started, you just need to understand three roles:
- Client — the program you install (graphical or command-line), responsible for reading the config, connecting to nodes, and showing the current status;
- Subscription Link — provided by your proxy service, a URL containing a list of nodes that the client periodically fetches updates from;
- Config File — a
config.yamlfile that defines all the routing rules and proxy-group logic. In most cases your subscription generates this automatically, so you won't need to write it by hand.
Get Started in 3 Steps
Getting from a fresh install to an actual working proxy only takes three steps — all point-and-click, no config file editing required:
Download and Install the Client
The easiest option is a graphical client for your OS. Installers and detailed steps for every platform are on the download page — just follow along.
Paste and Import Your Subscription Link
In the client's "Subscription Management" section, paste the subscription URL your proxy provider gave you and save — the client will immediately fetch the node list. Copy the entire URL (something like https://example.com/api/v1/subscribe?token=xxx) — don't truncate it.
Pick a Node and Enable the System Proxy
Choose a proxy group from the node list (the client usually auto-selects the fastest node for you), turn on "Set as System Proxy," and try visiting a site that needs the proxy — if it loads, you're all set. Just switch it off when you don't need it.
5 Core Concepts You Need to Know
You don't need to dig into these for everyday use, but if you want to fine-tune your own rules or troubleshoot an issue, these are the concepts you can't avoid — here's the plain-English version:
Proxy Groups
A proxy group bundles multiple nodes together and treats them as a single unit. There are three common types: "Auto Select" runs periodic latency tests and switches to the fastest node automatically; "Manual Switch" lets you choose the active node yourself; "Fallback" automatically switches to a backup node if the primary one fails, avoiding disconnections. Most subscription-generated configs already include sensible proxy groups, so you usually won't need to adjust them manually.
Rules and Rule Sets
Rules are matched in order, and as soon as one hits, it takes effect immediately — no further rules are checked. That makes order critical: your most specific, most frequently matched rules should be placed near the top. A Rule Set packages a large batch of similar rules into a single file that can be updated remotely, so you don't have to maintain each rule by hand — the rule set refreshes automatically whenever your subscription updates.
GeoIP / GeoSite
GeoIP is a database mapping IP addresses to geographic locations, while GeoSite maps domains to categories — both are the most common basis the rule engine uses to decide whether a destination belongs to your local region or not. This data is usually already bundled into rule sets, so no extra downloads or setup are needed.
DNS Leak Protection
If only your traffic is proxied but DNS queries aren't handled, domain resolution requests may still go directly to your local ISP's DNS, exposing which domains you're actually visiting — this is what's known as a "DNS leak." The client routes DNS queries by rule too (local/regional domains use your local DNS, everything else uses a secure remote DNS), eliminating the issue at the source. Most clients enable this by default, with no extra setup needed.
TUN Mode
The system proxy only applies to apps that respect the OS-level proxy settings — some games, command-line tools, and system-level requests bypass it entirely. TUN mode creates a virtual network adapter that intercepts all traffic at the network layer, giving much more complete coverage — the trade-off is it requires elevated system permissions (admin/root). The system proxy is enough for everyday browsing; turn on TUN mode only if you have specific needs.
Want to see what the actual config looks like? Expand this example snippet
proxy-groups:
- name: Auto Select
type: url-test
proxies: [NodeA, NodeB, NodeC]
url: http://www.gstatic.com/generate_204
interval: 300
- name: Manual Switch
type: select
proxies: [Auto Select, NodeA, NodeB, DIRECT]
rules:
- DOMAIN-SUFFIX,google.com,PROXY
- DOMAIN-KEYWORD,youtube,PROXY
- GEOIP,US,DIRECT
- DOMAIN-SUFFIX,doubleclick.net,REJECT
- MATCH,PROXY
These lines mean, in order: domains ending in google.com go through the proxy; domains containing "youtube" go through the proxy; IPs geolocated to the US (swap in your own country code) connect directly; ad domains are blocked outright; and any remaining unmatched traffic falls back to the proxy by default.
Clash Handles All of These Scenarios
Once you've got the basics down, here are some of the most common practical scenarios people ask about:
Per-App Proxying
If you only want a specific app (like a video or chat app) to use the proxy while everything else connects directly, add that app to the list in the client's "Per-App Proxy" settings. Every other app defaults to a direct connection, keeping things independent and cutting down on unnecessary traffic.
Blocking Ads and Trackers
Add an ad-domain rule set to your rules file — any matching request gets tagged REJECT and dropped immediately, essentially filtering ads at the network layer. Many ads and tracking scripts in browsers and apps will simply fail to load.
Combining Multiple Subscriptions
If you have subscriptions from more than one provider, most clients let you add multiple subscription links and mix nodes from different sources within the same proxy group. You can also use a "config merge" feature to combine several configs into one final config, so you don't have to switch back and forth.
Sharing with Other Devices on Your LAN
Enable "Allow LAN Connections" in the client's network settings, then note your machine's LAN IP and proxy port. Other devices on the same network (like a TV box or game console) can manually enter this proxy address to share the same rules — no need to install a separate client.
Advanced Tips for When You're Ready
Auto-Updating Remote Rule Sets — configure your rule set as a Rule Provider remote link, and its content refreshes automatically on the same schedule as your subscription, with no manual file replacement needed.
Config Overrides and Merging — some clients support an "override" or "merge" feature, letting you layer custom rules on top of your subscription's original config without modifying it directly — so your customizations survive subscription updates.
Syncing Configs Across Devices — as long as you use the same subscription link, the nodes and rules will match across devices after import. If you've added custom overrides, back that part up separately so you can restore it quickly on a new device or after a reinstall.
Saving Power and Resources — if battery life or performance matters to you, try lengthening the latency-test interval and turning off verbose connection logs — especially effective on older devices and routers.
Want to go even deeper — hand-writing rule syntax, setting up remote Provider management, or tuning advanced DNS/TUN parameters? Check out the Advanced Documentation.
FAQ
What's a subscription link, and where do I get one?
A subscription link is a URL generated by your proxy service provider, containing the list of nodes you can use along with recommended rules. Clash Official Site doesn't provide any nodes — you'll need to get your subscription URL from your own service provider.
No available nodes show up after importing my subscription?
First check whether your subscription link has expired or hit its device limit. You can also check the client's log panel at the bottom for network errors or format parsing failures when fetching the subscription.
Should I use the system proxy or TUN mode?
The system proxy is enough for everyday web browsing and app use — it's simple to set up and highly compatible. If you need to proxy games, command-line tools, or other programs that ignore system proxy settings, enable TUN mode for complete coverage.
How do I check which traffic is proxied and which is direct?
Most graphical clients offer a "Connections" or "Logs" panel that shows, in real time, which rule each request matched and where it ended up (DIRECT / PROXY / REJECT) — the quickest way to confirm your routing is set up correctly.
Old node info still lingering after switching subscription links?
Delete the old subscription entry in "Subscription Management" and add the new link fresh, or use the client's built-in "Update Subscription" feature to force an overwrite — this avoids old and new node lists getting mixed together.
Accidentally messed up your settings — how do you reset?
Re-importing your subscription link will overwrite most custom changes. If you're using the override or merge feature, back up your custom section beforehand, or simply delete the client's config directory and re-import.
Does using it on a phone drain a lot of battery or data?
Under normal use, the extra battery and data usage is minimal — most of the overhead comes from background latency tests and logging. Lower the test frequency or turn off verbose logging in settings to save even more resources.
Where is the config file usually stored?
The exact path varies slightly by client, but you can usually find an "Open Config Directory" option right in the settings panel. Use that to locate the folder containing your config.yaml if you need to edit or back it up manually.
Now that you understand how it works and the config syntax, all that's left is to download the client, import your subscription, and you're ready to go.