mihomo core · Open-source clients

Clash for Android
Clients and Configuration

Choose a client package for your platform, start by importing a subscription, and explore YAML configuration as needed.

  • Open-source core
  • English documentation
  • Field examples

Installers / PLATFORM

Choose a client for your platform

Check your device's operating system and processor architecture first, then open the matching download category. A graphical client lets you import configurations, choose policies, and view logs in its interface. Install the core separately only if you plan to manage the service process, permissions, and configuration paths yourself. Some configuration syntax is shared across platforms, but installers, system permissions, and client features are not interchangeable.

Windows

Check the system type under Settings → About, then pick a matching download. Export your settings and quit any older client to avoid port conflicts. After installing, test the system proxy in your browser first.

Go to downloads

macOS

Check About This Mac for Apple silicon or Intel. Keep your configuration file when migrating, but recheck proxy group selections and launch-at-login settings; they may not carry over.

Go to downloads

Android

Pick a package that matches your device, or use a universal build if available. Grant Android VPN permission on the first connection. If the app disconnects in the background, check battery and background activity settings.

Go to downloads

iOS

Open the App Store from the download page. After installing, import a supported subscription or configuration file in the app, then follow the system prompts to authorize the VPN configuration. Desktop settings such as listening ports, virtual adapters, and routes may not map directly to the mobile interface. When migrating, first confirm that the client recognizes the nodes and rules.

Go to downloads

Linux

On a desktop, choose a graphical client in the package format used by your distribution. A server can run the core on its own, but you'll need to arrange the service account, working directory, logs, and restart policy separately. Verify that the process can read the configuration from the expected directory before setting virtual adapter permissions. This makes it easier to distinguish configuration-loading errors from routing errors.

Go to downloads
View all clients →

Configuration Overview / YAML

Proxy groups, routing, and network fields

The five snippets below illustrate separate configuration sections; they are not a complete file to combine as-is. Before editing, identify the current traffic-capture mode, active configuration, and expected policy match. Change one item at a time, check the connection result, then move on.

Automatic proxy group testing

url-test compares candidate routes by response time against the same test URL. Define the two nodes referenced in the example under proxies, then point the relevant rule to this group. Consider the test interval and switching tolerance together: shorter intervals create more requests, while frequent switches between close results can make connections less stable. The result only reflects the specified URL at that moment; it is not a download-speed measurement and does not guarantee access to other sites. To troubleshoot, pin a route with a manual selection group, check whether the issue persists, then restore automatic selection.

url-testintervaltolerance
config.yaml / proxy-groups
proxy-groups:
  - name: Auto Select
    type: url-test
    proxies: [Route A, Route B]
    url: https://example.com/
    interval: 300
    tolerance: 50

Rule sets and matching order

rule-providers defines reusable rule collections, while RULE-SET sets their position in the matching chain. This example uses an inline domain rule to send the example domain and its subdomains through the direct policy. When switching to a separate rule file, first check that its content type matches behavior, then look for matches in the logs. The core checks rules from top to bottom and stops at the first match, so specific exceptions should come before broader rules. If traffic still follows the old policy after updating a rule set, check the reference name and rule order, then verify that the file loaded successfully.

rule-providersRULE-SETMATCH
config.yaml / rule-providers
rule-providers:
  demo-domains:
    type: inline
    behavior: domain
    payload:
      - '+.example.com'
rules:
  - RULE-SET,demo-domains,DIRECT
  - MATCH,DIRECT

DNS fake IP addresses

With fake-ip enabled, the core can return a virtual address for a domain and recover the domain name when capturing a connection for rule matching. To troubleshoot DNS issues, first confirm that requests reach the core, then check that the client retains this configuration and that the upstream resolver is reachable. For local services that require a real address, add a filter for the specific domains causing problems instead of disabling the entire enhanced mode. After a change, make the app resolve and connect again so an old cache isn't mistaken for the new configuration's result.

enhanced-modefake-ip-range
config.yaml / dns
dns:
  enable: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  nameserver:
    - system

TUN traffic capture

The system proxy mainly serves apps that actively read proxy settings. TUN captures eligible connections through a virtual adapter and system routes. This example shows automatic routing and outbound interface detection commonly used by desktop cores. Before enabling it, confirm that the client has the permissions required by the operating system, and check whether another VPN or virtual adapter is changing routes. For the first test, disable other capture methods and visit an external site and a local service separately. If the local service becomes unreachable, check the route scope instead of assuming the node is at fault.

tunauto-routeauto-detect-interface
config.yaml / tun
tun:
  enable: true
  stack: mixed
  auto-route: true
  auto-detect-interface: true

Local control port

external-controller is the interface a dashboard uses to read and write the core's runtime state; it is not a proxy port to enter in a browser. For local use, bind it to the loopback address. Set and document the proxy entry point and control interface separately, and update any dashboard that uses the interface when changing its port. If the dashboard cannot connect but apps still have network access, check the core process, control interface address, and dashboard connection settings separately. Add authentication on shared or untrusted machines. If remote management isn't needed, don't bind the control interface to an externally facing network adapter.

external-controllermixed-port
config.yaml / local interfaces
allow-lan: false
mixed-port: 7890
external-controller: '127.0.0.1:9090'

Find the relevant field by symptom

The connection reached the core but took an unexpected route. First confirm that the mode is Rule, then check which rule matched and which proxy group was ultimately used. A matching group name doesn't guarantee that its currently selected outbound is the one you expect.

Project Background / SOURCE

Open-source core and client maintenance

The core and graphical clients are maintained separately. Look to the core project for source code; check the selected client's release notes to see whether an installer suits your device.

Project history

Early versions of Clash brought node definitions, policy groups, and traffic rules together in one configuration, allowing users to adjust routing without changing app settings. Clash.Meta kept this structure while expanding protocol and networking features, and later continued development under the name mihomo. Basic fields in older guides can still help with orientation, but check which core a guide covers before relying on newer protocols, DNS behavior, or network stack options.

Open-source license and maintenance

mihomo is released under the GPL-3.0 license. Commits, issue discussions, and release notes in the repository can help trace the source of a change. Graphical clients usually have their own maintainers and release schedules; the core's license and maintenance status don't replace the client's own documentation. Before reporting an issue, identify whether it concerns installation, interface settings, or traffic forwarding, then use the relevant project's issue channel.

Interface and runtime configuration

The core parses configuration, handles connections, and applies rules; graphical clients manage importing, permissions, startup, and runtime information. Some clients merge interface settings before launch, such as writing a locally configured port into the runtime configuration. If a subscription file doesn't match the active settings, check the client's overrides and runtime logs first. Direct edits to a subscription cache may last only until the next update; a separate override or local copy is easier to review.

Updates and rollback

Updating an installer, refreshing a subscription, and syncing a rule set are three separate operations. If something goes wrong, note the most recent change, keep a working copy of the configuration, and repeat only the relevant operation. Before updating a client, check release notes for system permission or field compatibility changes. After a subscription refresh, review manually edited policy names and rule references to avoid configurations that load successfully but send traffic to the fallback policy.

Terminal / Get mihomo source code
git clone https://github.com/MetaCubeX/mihomo.git

Run in an environment with Git installed. This command retrieves the source code and commit history; use the platform download links for a regular installation.

Common installation and import questions

Can I use the same subscription on different devices?

That depends on the service provider's device policy and whether each client recognizes the format and protocol fields returned by the subscription. When using it on another device for the first time, compare the parsed nodes and proxy groups, then check which rules match for the sites you use most.

Why is there no traffic even though the app says connected?

“Connected” may only mean that the core or system VPN has started. Make a new request from a browser, then check the current traffic-capture method. If the browser has records but the target app doesn't, start by checking whether that app follows the system proxy settings.

Why did my custom rules disappear after a subscription refresh?

A remote update usually replaces the subscription contents. If the client supports overrides, put custom rules in a separate override and check where they are inserted. If you use a local file instead, you'll need to maintain node changes from the subscription yourself. Connection logs can confirm whether the new rules match before the fallback entry.

Read the terminology guide →

Practical Notes / NOTES

Configuration troubleshooting and client selection

These three articles cover DNS paths, rule priority, and platform differences. Choose one based on the issue; when switching clients, compare essential features before considering interface preferences.

View all articles →