Choose a Clash client for your operating system and use configuration examples to explore mihomo rules, proxy groups, and network settings.
Core mihomo
License GPL-3.0
YAML Configuration
mihomo — ~/.config/mihomo
$ mihomo -d~/.config/mihomo
level=info Start initial configuration in progress
level=info Mixed(http+socks) proxy listening at 127.0.0.1:7890
level=info RESTful API listening at 127.0.0.1:9090
toolbox · config.yaml
mixed-port: 7890
mode: rule
allow-lan: false
dns:
enhanced-mode: fake-ip
Popular Tools
Rule Setsrules
Proxy Groupsproxy-groups
TUNtun
External Controllerexternal-controller
❯ mihomo -t -d .
Install & Import
For your first run, import a configuration from a trusted source, make sure the client has selected it, then enable the system proxy. If the configuration appears in the list but no proxy groups show up, check the import result and startup logs before changing system network settings.
A client installing successfully only confirms that your system is compatible. Also check which core it uses, how configuration overrides work, and where to find connection logs. If you use the same configuration on multiple devices, make sure each client supports its protocols and fields.
Before changing proxy groups, rule sets, or listening ports, keep a working copy of your configuration. Change one category of fields at a time, reload, then check rule matches and startup logs. If an update removes your changes, check whether the client supports local overrides.
See how to use each option on the left and compare configuration fields on the right. Examples show only the current topic and are not complete configurations.
From the User's Perspective
Check Which Rule Matched
Rules are checked in list order, and processing stops at the first match. Unlike Global mode, Rule mode lets you route different destinations directly, block them, or send them to a specific proxy group. If the result isn't what you expect, first make sure the client has selected the configuration you're checking. Then find the request in the connection list and verify the rule type and final route. Put more specific domain rules before broader ones, and leave the catch-all rule at the end. The example's PROXY must match a proxy group or proxy name defined in your configuration.
Where to Check in the Client
Connections → Target request → Matched rule and proxy chain
From the Configuration's Perspective
config.yaml · rules
rules:
REJECT- DOMAIN,blocked.example.com,REJECT
DIRECT- DOMAIN-SUFFIX,example.com,DIRECT
DIRECT- GEOIP,CN,DIRECT
PROXY- MATCH,PROXY
From the User's Perspective
Separate Routing Rules from Proxy Selection
Rules decide which group handles a connection; the proxy group decides the actual route. To pin a route, use a manual selection group. For automatic switching, compare URL-test selection with fallback behavior. URL-test results depend on the probe URL and interval; a successful probe doesn't guarantee that a site will be reachable. After updating a configuration, check that the group names referenced by rules match the names defined in the configuration before testing a connection. This example shows how to manually choose between two defined proxies.
Where to Check in the Client
Proxy → Proxy group → Select a route
From the Configuration's Perspective
config.yaml · proxy-groups
proxy-groups:
- name: PROXY
type: select
proxies: [出口 A, 出口 B]
From the User's Perspective
Keep Domain Names Mapped to Connections
Fake-IP returns a virtual address for DNS queries handled by the core, then uses a mapping to recover the domain name when the connection is made. Unlike modes that return real addresses, a virtual address doesn't mean DNS resolution failed. If an app needs real addresses, add a filter for the specific domain and test again rather than changing the entire DNS setup. After switching modes, clear relevant system and app caches before making a new request. If the query never went through the core, first check which resolver path the system or app is using.
Where to Check in the Client
Configuration → DNS → Resolution mode and filters
From the Configuration's Perspective
config.yaml · dns
dns:
enable: true
enhanced-mode: fake-ip
fake-ip-filter:
- '+.example.com'
From the User's Perspective
System Proxy vs. Virtual Network Interface
A system proxy works only when an app reads the system's proxy settings. TUN uses a virtual network interface to receive traffic routed through it. If an app ignores the system proxy, test TUN separately and confirm the client has the required permissions. After enabling it, check the target app, frequently used websites, and local network services—not just the toggle. If you lose connectivity, turn off TUN to restore the previous setup, then check for routing conflicts with other virtual interfaces or VPNs and see which path DNS requests are taking.
Where to Check in the Client
Network Settings → TUN → Logs and connections
From the Configuration's Perspective
config.yaml · tun
tun:
enable: true
stack: mixed
auto-route: true
auto-detect-interface: true
From the User's Perspective
Keep the Control Port Separate from the Proxy Port
The external controller lets compatible dashboards inspect connections and change proxy selections. It isn't the port to enter in a browser or system proxy setting. For local management, use a loopback address so devices on your network can't access the controller. Set a separate access credential as described by the client, and never paste the actual value into shared configurations or logs. If a dashboard can't connect, check the startup logs for the controller's listening address, then compare it with the dashboard settings. After changing the configuration, confirm that the effective address is still loopback.
Where to Check in the Client
Startup logs → RESTful API listen address
From the Configuration's Perspective
config.yaml · Local listener
external-controller: 127.0.0.1:9090
mixed-port: 7890
allow-lan: false
A GUI client shows its interface options; the core reads the final generated configuration. If they don't match, first identify the selected subscription, local overrides, and file loaded at startup, then locate the specific field. See the advanced configuration guide for field combinations and complete examples.
Getting Started
Quick Start with Clash
The goal of your first setup is to confirm that one connection works. Import, enable, and verify in separate steps, returning to the step that failed.
Import and Select a Configuration
Open the client's configuration page and import a local YAML file, or add a URL from a trusted source through the subscription option. After importing, select the configuration to activate it, then check that the proxy page shows the expected groups. Some clients keep using the previously selected configuration, so seeing a new entry in the list doesn't mean the client has switched. If import fails, check the log for a field name or line number. Don't include the full subscription URL when asking for help.
Choose Rule Mode and Enable Routing
Switch to Rule mode, open the proxy groups, and select a route you know works. On desktop, if you're only testing a browser that supports the system proxy, start with that and leave TUN off. On mobile, follow the system prompts to authorize the client's network access. If another proxy or VPN is already active, check which app controls the connection to avoid clients overwriting each other's settings. Leave the existing DNS settings unchanged for now.
Make a New Connection and Check the Logs
Visit a website you can normally access and check the client's connections page for the domain, matched rule, and proxy chain. If no new entry appears, first check whether the app is routing through the client. If an entry appears but the request fails, check the route and DNS. A page may reuse an existing connection, so make a new request after changing proxy selections. For certificate errors, note the affected domain, time, and error text; don't bypass certificate checks to test connectivity.
Connectivity should return to normal after you close the client. If websites are still unreachable, check whether the system still points to a local proxy port, then use the FAQ to troubleshoot by symptom.
Filter by operating system, then check the processor architecture, package format, and system requirements. GUI clients are suited to everyday use; standalone core packages are mainly for command-line use and server deployment.
For users who want a desktop interface to import subscriptions and switch the system proxy. Before downloading, check your processor architecture in system information. If another proxy was installed previously, confirm after installation that the system proxy points to this client.
In About This Mac, check whether your device has Apple silicon or an Intel processor, then choose the matching package. If you need the app to launch at startup or use a specific network mode, check the selected client's permission requirements.
Choose an installer that matches an architecture supported by your device; the processor name alone doesn't tell you whether the system can run a particular app. If a system VPN approval prompt appears, confirm that it was triggered by the client you just installed.
Open the app's App Store page from the platform directory and check device compatibility. Before moving a configuration from desktop, read the app's import instructions and confirm that it supports your subscription format and configuration options.
Desktop users should check which package formats and architectures their distribution supports before choosing a GUI client. For servers and routers managed only through a terminal, see the core section and check the configuration directory, permissions, and startup method.
When moving to a new device, it's usually better to migrate readable configuration files and overrides than to copy the entire app data directory. Recheck system proxy settings, permissions, and network interfaces on the new system.
Configuration syntax, core behavior, and client features are maintained by different projects. Before consulting documentation, identify which project's implementation you're using.
From Clash to mihomo
The original Clash established a configuration model that organizes connections using rules and proxy groups. Clash.Meta continued that model and is now maintained under the mihomo name. Sharing the YAML extension doesn't mean different cores support exactly the same fields. When migrating an older configuration, keep the original and check each proxy protocol, rule-set type, DNS setting, and TUN option against the core documentation. A configuration loading successfully doesn't guarantee identical behavior. In particular, confirm that the catch-all rule and default proxy group still behave as expected.
What Clients and Cores Do
GUI clients mainly handle configuration imports, the interface, and system integration. The core establishes connections, matches rules, and handles DNS requests that pass through its resolver. Different clients may bundle different cores or let you update the core separately. If a field isn't available in the interface, check the client's overrides and advanced settings first, then see whether the current core supports it. For unexpected routing behavior, rely on the final loaded configuration and core logs—not just the interface toggles.
Using Community Resources
The mihomo repository publishes source code, license information, issues, and release history. Use it to check whether a field is implemented or an issue has already been discussed. When reporting a problem, reproduce it with a trimmed configuration that retains the relevant rules, mode, and logs. Remove subscription URLs and access credentials. For interface, system integration, or import issues, start with the relevant client project. Check the core project only after confirming that the issue involves rule processing or network behavior.
Know Which Update You're Installing
The app package, core, and subscription each have their own update path. App release notes cover interface and system compatibility changes; core release history covers configuration compatibility; refreshing a subscription changes the configuration itself. Before updating, save your local overrides and active configuration. Afterward, test direct and proxied connections, then check network-dependent features such as TUN and local network access. If a regression appears, compare update sources one at a time instead of changing several at once.
Technical Notes
Configuration, Core Behavior & Troubleshooting
Proxy group switching, browser certificate errors, and a connected client with no internet access are three different problems. Choose a troubleshooting path based on what you're seeing before changing the configuration.
Core & Advanced
Choosing Between url-test, fallback, and load-balance
Compare how three automatic proxy groups probe, switch, and distribute traffic. Explore the interval, tolerance, and strategy fields, with configuration recommendations for different use cases.
For readers who already know how to choose a route manually and want to understand the difference between probe-based selection and ordered fallback.
Are HTTPS Certificate Errors in Your Browser Related to Your Proxy?
Learn how certificate errors can result from clock drift, HTTPS interception, Fake-IP caching, or network hijacking, and how to tell whether the problem lies with the proxy or the website.
Start with the scope of the error: check whether it affects one site, one browser, or multiple devices, then compare network environments.
Check in this order: system proxy → port availability → rule match → DNS interference → proxy node availability.
If no websites load, first check whether requests are reaching the client. Don't keep switching routes when the connection isn't reaching it in the first place.