Open-source core · Windows / macOS / Android / iOS / Linux

Clash Official SiteCross-platform client downloads and setup

Choose a client for your platform, then start with subscription import and configure rule-based routing and TUN mode step by step.

  • Open-source core
  • YAML examples
  • Chinese documentation
01 / SETTINGS INDEX

Clash Configuration Examples

Six commonly used settings. Each example shows only the relevant fields; snippets illustrate configuration structure and are not complete, import-ready files.

Rule-based routing

Rule mode checks connections from top to bottom and stops at the first match. Put specific domain conditions first, broader conditions later, and finish with a fallback rule to define what happens when nothing else matches. Unlike Global mode, Rule mode lets different requests from the same app use different routes. When making changes, start with a domain you can reliably reproduce, reconnect, and check the matched rule and final route in the connection details. Once routing works as expected, extend the rule to similar domains.

rules:
  - DOMAIN,docs.example.com,DIRECT
  - DOMAIN-SUFFIX,example.com,PROXY
  - MATCH,DIRECT

Proxy group strategies

A proxy group collects multiple routes under one reusable name. Rules point to the group, which then selects the route, so you can change exits without rewriting rules. A manual group keeps the selected option; an automatic URL-test group chooses based on probe results. These results show connectivity and response time to the test URL, not how every website will perform. For sessions that are sensitive to route changes, use a manual group. When troubleshooting an automatic group, check the test URL and confirm that each member is usable.

proxy-groups:
  - name: URL test
    type: url-test
    proxies: [Line A, Line B]
    url: "https://www.gstatic.com/generate_204"
    interval: 600

TUN mode

TUN uses a virtual network interface and routing to capture traffic, making it suitable for apps that ignore system proxy settings. Before enabling it on desktop, confirm the client has the required permissions and note the status of other VPNs or virtual adapters. Test one traffic entry point at a time: establish a baseline with the system proxy, then compare it with TUN enabled. After enabling TUN, reconnect the same app, check the Connections page to confirm its requests reach the core, and verify that LAN resources remain accessible. Proxy mode controls where traffic goes after entering the core; it does not replace routing configuration.

tun:
  enable: true
  stack: mixed
  auto-route: true

DNS handling

DNS settings determine both which resolver looks up a domain and which address is returned to the app. Fake-IP returns a mapped address so the core can recover the domain for subsequent connections and apply domain rules; this differs from returning the actual resolved address. Intranet services and apps that require real addresses may need separate handling. If resolution fails, compare the address received by the app with the destination shown by the client, then confirm that the client's DNS handling is actually capturing the request. Not every connection failure is caused by the upstream resolver.

dns:
  enable: true
  enhanced-mode: fake-ip
  fake-ip-filter:
    - "*.lan"

Subscription updates

Updating a client subscription usually fetches the entire remote configuration again. A proxy provider in the core, by contrast, refreshes only a list of proxies that policy groups can reference. The two update types differ in frequency and scope. To preserve local rules, use the client's override or merge features where available rather than editing a remote copy that may be replaced on the next update. After updating, verify which configuration is active and whether the original groups still contain the same members. Subscription URLs may contain access credentials; redact the full URL before sharing logs or screenshots.

proxy-providers:
  upstream:
    type: http
    url: "https://example.com/proxies.yaml"
    path: ./providers/upstream.yaml
    interval: 86400

Multi-core compatibility

Being able to read YAML does not mean a core can use every field in it. Before migrating, check the running core in the client settings, then review the configuration against its supported protocols, rule types, and network stack. Start with basic mode and port fields, then add advanced options back in stages. If a rule or protocol is unsupported, use the logs to identify the specific field instead of changing it to a similarly named option. After loading the new configuration, reconnect and verify that traffic capture and routing match the previous setup. Keep a configuration copy ready for an immediate rollback.

mode: rule
>mixed-port: 7890
>allow-lan: false

In these examples, PROXY is a custom name, not a default route. Before using it, confirm that your configuration defines a policy group with the same name. If you rename the group, update the rules and any other references too.

Client window overview · Example settings locations
Clash
  • Proxies
  • Profiles
  • Connections
  • Logs
  • Settings

Modes and traffic entry points

Select the configuration to use on the Profiles page, then choose a mode on the Proxies page. Use Connections to confirm whether requests reach the core, and Logs to check for loading or forwarding errors. Some clients put the traffic entry switches in Settings; if you can't find them, first check which options your platform supports.

  • Proxy modemodeRule / Global / Direct
  • System proxyOn
  • TUN modeOff
02 / PLATFORMS

Download by operating system

Check your OS, CPU architecture, and installation type before choosing a client. A desktop app and a standalone core are different kinds of packages.

Windows

For switching configurations, viewing connections, and managing the system proxy on desktop, start with a GUI client. Find your system type under Settings → System → About, then match it to the package architecture. If you already use a manual proxy, note its settings before enabling the client so you can restore them after exiting.

Go to downloads

macOS

If two nearby packages differ only by architecture, open About This Mac to see whether your device has Apple silicon or an Intel processor, then choose the matching file. You can switch configurations from the menu bar. If you need TUN, check whether the client requires a system extension or helper service.

Go to downloads

Android

Choose an APK based on the app architectures supported by your device; the processor model alone doesn't tell you whether Android can run a particular package. If you're unsure, check whether the client offers a universal build. On the first connection, Android will usually ask you to allow a VPN connection. If another VPN is already running, check whether switching will interrupt it.

Go to downloads

iOS

Check the client's details and device compatibility in the App Store. After installation, import a configuration in the app, then follow the system prompts to add a VPN configuration. If several VPNs are listed, identify which one is currently enabled. Once the system shows a connection, test it by sending a request from an app.

Go to downloads

Linux

For desktop Linux, choose a GUI client based on your distribution and architecture; start by distinguishing DEB from RPM packages. For a server or router that only needs a process and configuration file, see the standalone core section on the downloads page. A desktop system proxy setting is not the same as proxy configuration for a service process; they may use different entry points.

Go to downloads

View all clients →

03 / FIRST CONNECTION

Get started with Clash

For your first setup, verify one complete path: the configuration is active, app traffic reaches the core, and requests are routed as expected.

  1. Import and activate a configuration

    Open Profiles, choose URL or local file as the source, and import the configuration. Then select it to make it active. Seeing a name in the list only confirms that it is available; it doesn't mean the core has loaded it. Before changing modes, check that the expected policy groups appear on the Proxies page. If the list is empty or an error appears, check the logs for an unreadable file or a missing group referenced by a rule. Keep your existing configuration while troubleshooting; don't delete the working one just to retry.

  2. Choose Rule mode and a traffic entry point

    Go back to Proxies, choose Rule mode, and select an exit for any policy groups that require manual selection. On desktop, start with the system proxy and test an app that uses it; on mobile, start the VPN as prompted by the client. If another proxy or VPN is active, first identify which one is handling requests. Test TUN separately only if the target app bypasses the existing entry point. Changing proxy mode, DNS, and the traffic entry point at the same time makes it harder to identify the cause of a failure.

  3. Check connections and rule matches

    Start a new connection from the target app, then check its destination, matched rule, and route on the Connections page. Existing connections may keep using their previous route, and refreshing a page may not create a new connection. If the request isn't listed, check whether the app uses the relevant entry point. If it appears but takes the wrong route, review rule order and group selection. If the rule and route are correct but access still fails, use the logs to distinguish DNS failures, connection timeouts, and rejections from the destination service.

Read the full guide →

04 / UPSTREAM NOTES

Clash open-source projects and update sources

Clients, cores, and subscriptions each have their own sources. When installing, upgrading, or troubleshooting an error, first identify which layer you're dealing with.

Project history

The original Clash brought proxies, policy groups, and rules together in a YAML configuration, while desktop and mobile platforms developed their own GUI clients. Clash Meta carried on and extended this configuration model, and is now maintained as mihomo. When reading an older guide, check whether it describes core fields or interface controls: common concepts may still apply, but menu paths and extended fields should be verified against current client and core documentation. Similar names don't prove that projects share a release channel, nor that every option in an old screenshot still exists.

Community maintenance boundaries

Commit history, issue discussions, and release notes in open-source repositories help track changes in behavior. The mihomo license applies to the core project; it doesn't mean every GUI client uses the same license. Before reporting an issue, narrow down how to reproduce it: for errors that occur only after reloading the interface, document the steps; for configuration issues that also occur with the standalone core, provide a minimal configuration and the error message. Before posting publicly, remove subscription URLs, credentials, and connection details unrelated to the issue.

Clients, cores, and configurations

A GUI client handles interface interactions and may also manage the system proxy and merge configurations. The core reads the final configuration, matches rules, and makes connections. Subscriptions are generally managed by the configuration provider and aren't updated with the client or core package. If the same subscription routes traffic differently on two devices, check the selected policies, merged rule order, and how requests enter the core on each device. Comparing these conditions helps pinpoint whether the difference comes from app behavior, client defaults, or core features.

Updates and rollback

Before upgrading, check whether the release notes cover the client interface, bundled core, or configuration compatibility, and keep a local configuration you can reactivate. After upgrading, retest with the same app and destination, checking loading, DNS resolution, and routing separately. Avoid updating the subscription and changing DNS in the same test. If behavior changes, restore the previously active configuration before comparing logs. Once you identify the change, see the advanced setup and maintenance steps in the system guide as needed.

05 / FIELD NOTES

Tips and insights

Trace issues through connections, rules, and DNS resolution before deciding which setting to change.

View all articles →