Choose a Clash client for your platform, then use the config.yaml examples to learn how to import a configuration, route traffic, and verify your connection.
Start with the section you need to change. Inbound ports determine where traffic enters; rules determine where it goes; proxy groups choose the outbound route. DNS, remote rules, and local overrides each have their own place.
The diagram groups settings by purpose; a request does not necessarily pass through every component. For example, an app can connect directly to the mixed port, while system traffic may be routed through a virtual network interface. To change the route for a domain, start with its rule and proxy group. If the issue is name resolution, check the DNS path. Replace only the sections relevant to the problem, and keep a working copy of your configuration for recovery.
01 / CLIENTS
Download a Clash Client for Your Platform
Check your operating system and processor architecture before choosing an installer. A client may have several platform variants. Configuration files can be migrated separately, but review the new client's interface settings, system proxy status, and local rule cache after switching.
A good fit for desktop users who switch configurations from the system tray. Check your device architecture in system information. If you're migrating from Clash for Windows, back up your configuration and quit the old client first to avoid both apps listening on the same port.
In About This Mac, check whether your device has Apple silicon or an Intel processor. After installation, confirm the client is running from the menu bar, then make sure the proxy settings for your active network service match the client's status.
Choose an installer that matches your device's app architecture. A universal build is available only when listed in the client downloads. The first time you connect, approve the system VPN prompt and check that another app isn't already using the system VPN connection.
Open the app's App Store listing from the downloads page and check device compatibility. After installing, import a trusted configuration in the app, add the VPN configuration when prompted, then return to the app to confirm the connection status.
For desktop Linux, choose a graphical client that matches your distribution, package format, and architecture. For a server or router, select the appropriate core binary. On a new machine, check the listening address and firewall rules before deployment.
If several clients are available for your platform, compare their everyday features in the client selection guide: local file editing, subscription updates, connection logs, and system-level routing. Interfaces vary, so focus on whether the features you need are supported by the core in use.
Break a connection into three questions: did it reach the client, which rule matched, and which outbound route did that rule select? The examples below cover each step and its key fields. These are configuration snippets; referenced proxy groups and members must be defined in the full configuration.
Rules are checked in order, and a match sends the request to the specified outbound route. Put specific domain or IP range rules first, then use a catch-all rule for the rest. Unlike Global mode, which sends all requests through one route, Rule mode can keep LAN services on a direct path while sending other traffic to a chosen proxy group. After making changes, check the matched rule and actual route on the Connections page. If the result is unexpected, verify the current mode and check whether a broader rule earlier in the list matched first.
Proxy groups give rules a consistent name to reference and map that name to a set of outbound options. A manual group suits tasks that need a fixed route; a URL-test group periodically checks members against a specified URL and selects one automatically. The test time reflects the round trip to that URL, not download speed. Check the referenced proxy names and test URL, then observe real connections. If the selected route changes too often, review the test interval and latency tolerance.
System proxy settings mainly affect apps that follow the operating system's proxy configuration. TUN uses a virtual network interface and routes to capture traffic from other apps. Before enabling it, check the client's permissions and network interfaces, then decide whether the core should add routes. Work VPNs, virtual machine bridges, and LAN services may depend on existing routes. Keep a local access path you can test; if conflicts arise, disable traffic capture and check interfaces and routes one at a time.
When client DNS is enabled, the core handles domain queries sent through its DNS chain and forwards them to the selected upstream. Unlike changing only the system DNS, core settings can route different domains to different resolvers. First confirm that the app's queries reach this chain, then check that the upstream is accessible from your network. If an app can connect by IP but not by domain, distinguish between browser-specific, system, and core DNS resolution, then adjust the upstream at the failing step.
Configuration overrides keep local changes separate from the base configuration, so settings such as log levels or local routing rules can survive subscription updates. Each client determines when overrides apply and whether lists are replaced, prepended, or appended; you can't infer how an entire list behaves from the result of a single field. Start by changing only the log level, reload, and inspect the effective configuration before editing rule lists. To rule out an override, disable that layer and retry under the same conditions.
proxy-groups:
- name: Auto Select
type: url-test
proxies: [Member A, Member B]
url: https://www.gstatic.com/generate_204
interval: 300
tun:
enable: true
auto-route: true
dns:
enable: true
nameserver:
- 1.1.1.1
# Base configuration
log-level: info
---
# Override layer
log-level: warning
---
# Effective configuration (based on the client's merged result)
log-level: warning
When reviewing a configuration, distinguish the run mode from the traffic capture method. Rule mode determines how the core routes requests it receives; system proxy or TUN determines which requests reach the core. If rules are correct but the Connections page shows no activity, check the entry point first. If connections appear but use the wrong route, check rule order and proxy group options. View general fields →
03 / PROFILE WORKFLOW
Import a Configuration and Verify the Connection
For your first setup, get one configuration working with one traffic capture method. Once it's verified, add rule providers, switch to an automatic proxy group, or enable other advanced options. This makes it easier to tell an import issue from a capture failure or an outbound connection problem.
01
Import and Activate a Profile
Open the client's configuration page and import a trusted subscription link or local YAML file. When it appears in the list, select it as the active configuration, confirm that it parses correctly, and check that the expected proxy groups appear on the Proxies page. If the client flags a line as invalid, check its indentation and field type, then reload.
02
Choose a Mode and Traffic Capture Method
Start with Rule mode, then decide how traffic should reach the client. On desktop, enable the system proxy for a browser first; on mobile, approve the connection when prompted by the operating system. Keep to one entry point for the initial test. If you later need to capture traffic from apps that ignore system proxy settings, configure and test TUN separately.
03
Check the Actual Route
Open one site expected to connect directly, then another that should use a proxy. Compare their matched rules, proxy groups, and outbound routes on the Connections page. A connected status alone doesn't show which path web traffic is taking. After changing a rule, test with a new connection rather than reusing one the browser already established.
Record the domains used for this test and their expected routes. After switching clients, updating a subscription, or changing traffic capture, repeat the same tests to see where the results start to differ.
Check the core information in your client to identify the project it uses, then consult that project's repository for documentation, release notes, and issue discussions. Similar project names don't guarantee the same configuration support.
Project history: From Clash to community forks
The original Clash core established a YAML-based approach to proxies, proxy groups, and routing rules. Community projects later retained many of its fields and expanded DNS, routing, and traffic capture capabilities. Archived clients can still be useful references. For a new installation or migration, choose a client with active releases for your platform, then confirm which core it actually uses; a product name alone doesn't indicate whether it's maintained.
Open-source ecosystem: Verify behavior against public records
The Mihomo repository provides source code, release history, and issue discussions. To check how a field behaves, start with the current core documentation and review release notes for changes. If the implementation and docs still differ, look for an issue with a minimal configuration and reproduction steps. A temporary configuration in one comment may apply only to the system, network, or test build available at the time.
Separation of responsibilities: The core applies configuration; the UI manages state
The core parses fields, listens on ports, routes traffic, and forwards requests. The client UI imports and switches Profiles and may manage the system proxy, launch arguments, or local overrides. When diagnosing an issue, first check whether connections reach the core. If connection records don't match the configuration, inspect the effective configuration. If only a UI action fails while traffic works, check the client settings and logs.
Updates: Check the app, core, and subscription separately
Updating the app, switching the core, and refreshing a subscription are separate operations. The app controls the interface and system integration; the core determines field and protocol support; a subscription may replace proxies or rules. If connections fail after an update, keep the old Profile, identify which source changed, and compare connection records with the same domain and network conditions. Change one layer at a time, and roll back at the same level.
Installation and Configuration FAQs
Can I keep using my Profile after switching clients?
Import a copy of your existing configuration first, then confirm that the new core recognizes its proxies, rule providers, DNS, and TUN fields. Rule providers that use local paths need to be located again on the new device. Also check the client's port, scheduled subscription updates, and override settings separately.
Why don't some apps show connection records when system proxy is enabled?
An app must read and follow the system proxy settings to use the system proxy. First, use a browser to check that the proxy port works, then see whether the target app uses its own network settings. To capture traffic from other apps, assess TUN support for your system and client, and keep existing VPN and routing settings in mind.
Why is real-world performance still slow when proxy latency is low?
A latency test mainly measures the response time between a proxy and a specific test URL. Actual performance also depends on the destination service, network congestion, and your local connection. Testing the same destination on the same network and comparing connection logs is more useful than comparing one-off latency results from different test URLs.
How can I keep manual rules from being overwritten after a subscription update?
First check whether you edited the subscription itself or a separate override layer. If your client supports overrides, move the changes there and check rule order after reloading. To preserve the full configuration as it was, export it as a local YAML file and manage it as a separate Profile.
Choose a guide for the task at hand: start with Profile basics to import or manage multiple configurations; if the client starts but websites won't load, follow the troubleshooting checklist; compare proxy group types only if you need to switch automatically between proxies.
Learn how Profiles relate to subscription links and local config.yaml files. Follow examples for importing, renaming, scheduling updates, and switching between configurations, plus tips for using overrides.
Check the system proxy toggle, port conflicts, subscription status, run mode, DNS settings, TUN conflicts, and matched rules in order. Use this practical checklist to find why Clash shows connected but you can't get online.
Learn how three automatic proxy group types work through YAML examples, including key settings such as interval and tolerance, when to use each type, and common pitfalls.