· Core Internals · 8 min read

mihomo vs. Original Clash: New Protocols, Rule Sets, and Configuration Changes

Compare mihomo (Clash Meta) with original Clash, including added protocol support, rule-providers, DNS and TUN options, plus configuration changes for migration.

Core Versions and Configuration Compatibility

Clash Meta is the former name for mihomo. When comparing it with original Clash, distinguish the original open-source core from the separately released Clash Premium. Rule sets and TUN support did not originate with mihomo: Premium already supported related features, but its configuration should not be treated as universal for the original open-source core, nor should you assume every field behaves the same in mihomo.

Before migrating, confirm which core the client actually launches. The client version and core version are separate. If you can access the mihomo executable in use, run mihomo -v to check its version; a separately downloaded binary with the same name does not tell you which core the desktop client is running.

Configuration optionHow to handle it when migrating to mihomo
mixed-port、modeKeep the existing value initially. If the client overrides the listening port or operating mode, use the value applied at startup.
proxies、proxy-groups、rulesCommon structures can usually be retained. Check each proxy type, group member name, and rule target.
rule-providers、RULE-SETIf the old configuration came from Premium, check how it is loaded, how its rules behave, and the actual matching order.
dns、tunMigrate and test each part separately. Don't change the DNS upstream, enhanced mode, and system routes all at once.

New Protocols: Check the Proxy Type, Then the Transport Options

mihomo supports a broader range of outbound protocols than original Clash. For example, a VLESS proxy uses type: vless, Hysteria 2 uses type: hysteria2, and TUIC uses type: tuic. Changing type: vmess to type: vless in an old configuration does not convert the protocol. The proxy type, credentials, and transport options must match the server.

  • VLESS and REALITY: VLESS is a proxy protocol; REALITY is not a standalone type. For a VLESS proxy using REALITY, check servername, public-key and short-id under reality-opts. Set the corresponding flow only if the server requires Vision.
  • Hysteria 2 and TUIC: Both are based on QUIC. Resolving the server hostname, loading a webpage, or reaching the server's TCP port does not prove that UDP traffic can reach the same port. When troubleshooting, check the protocol fields, authentication details, and whether the network allows UDP.
  • Importing subscriptions: First, distinguish a complete YAML configuration from a proxy list intended only for a proxy provider. A successful subscription update only means the client retrieved the content; if no proxy group references the new proxies, normal requests may still use the previous outbound.

Rule Sets: File Formats, Behavior, and Matching Order

rule-providers registers rule sets, while RULE-SET entries in rules determine when they apply and which outbound is used on a match. The example below uses a local file for migration, keeping remote rule-set download failures separate from configuration errors.

Rule Set References in the Main Configuration

mode: rule
rule-providers:
  local-domains:
    type: file
    behavior: classical
    format: yaml
    path: ./rules/local-domains.yaml
rules:
  - RULE-SET,local-domains,DIRECT
  - MATCH,DIRECT

Rule set file rules/local-domains.yaml

payload:
  - DOMAIN-SUFFIX,example.org

Both rules point to DIRECT to check rule matching without changing the default outbound. In rule mode, the core checks rules in order and typically uses the first match. In the connection log, verify that example.org matched RULE-SET, not the final MATCH rule; the outbound name alone can't distinguish them. Put the fallback rule in your actual configuration last, and check whether a broader domain or IP rule above it matches first.

With behavior: classical, you can use entries like DOMAIN-SUFFIX,example.org in the example. behavior: domain reads domain match entries and does not use rule-type prefixes like these; behavior: ipcidr reads IP ranges. format describes the file encoding format, not the matching behavior. Changing a file extension to .mrs does not convert YAML to MRS. To use MRS, use an actual MRS file and set the rule behavior to domain or ipcidr.

DNS Migration: Distinguish Destination Domains from Proxy Server Domains

The destination domain is the address an app accesses; the proxy server domain is the address of the proxy server itself. A client resolving the former does not mean the core can resolve the latter. If the node's server field uses a domain name, mihomo can use proxy-server-nameserver to specify an upstream resolver for proxy server domains. Make sure that resolver is reachable before the node connects, to avoid a dependency where the node must connect before its hostname can be resolved.

  • nameserver is one of the upstream settings for regular queries; nameserver-policy can route queries for matching domains to a different upstream. For corporate intranet domains, use a DNS server that can resolve the internal zone rather than simply adding a public resolver.
  • enhanced-mode: fake-ip returns mapped addresses for matching queries. If the running configuration uses 198.18.0.1/16, responses in that range are usually expected; they are not the destination server's public IP address.
  • If an intranet domain needs to resolve to its real IP, check fake-ip-filter and fake-ip-filter-mode. In blacklist mode, domains matching a filter entry are not assigned Fake IPs. Filtering changes the type of response; it does not automatically select an upstream that can resolve the intranet domain.

If regular DNS queries succeed but an app still fails, compare the resolution path used by the app with the core's connection log for the same domain. A browser's encrypted DNS may take a different path. Also, rules that rely on IP addresses may trigger domain resolution. Adding no-resolve to an applicable rule prevents that rule from actively resolving the domain to an IP; it does not disable DNS globally.

TUN Migration: Verify the Proxy Port Before Routing System Traffic

The system proxy relies on apps honoring proxy settings; TUN captures traffic through a virtual network interface and routes. A browser working through the system proxy does not prove that TUN is capturing traffic from terminal tools, games, or other apps that ignore system proxy settings. During migration, turn off TUN first and verify the proxy listener and node, then enable TUN separately and compare the results.

  1. If the running configuration uses mixed-port: 7890, run curl -I --proxy http://127.0.0.1:7890 https://example.org/. In Windows PowerShell environments where curl is an alias, use curl.exe. After receiving a response, check the connection log to confirm the request used the intended policy; a response alone does not prove that the proxy node was selected.
  2. After enabling tun.enable, check that the core has permission to create a virtual network interface and modify routes. auto-route controls automatic route installation. If Ethernet, Wi-Fi, and other VPNs are active at the same time, check that the automatically detected interface is correct; don't mistake the default route for a proxy node failure.
  3. If only DNS breaks after enabling TUN, check the matching scope of dns-hijack. any:53 matches UDP port 53, while tcp://any:53 matches TCP port 53. These rules do not capture encrypted DNS over HTTPS as regular port 53 traffic.

How to Verify a Migrated Configuration

Keep the working configuration and test the new one in a separate working directory. Run the commands below from the directory containing the configuration. If you use a desktop client, also check the configuration passed to the core after subscription merging and overrides.

mihomo -v
mihomo -t -d . -f config.yaml

-t tests the configuration but does not replace runtime verification. First, use a known-working node to test the proxy entry point. Then check one request that should go direct and one that should use a proxy group. Finally, verify DNS and TUN separately. If a problem returns after a subscription update, compare the actual rule order and group members before and after the update, and check whether overrides are still applied.

If even intranet access stops working after switching, disable TUN first and restore the previous system proxy settings and configuration, then retest each change separately. See the configuration reference for field definitions, and the glossary for how app proxies, proxy groups, and the core fit together.

Download Clash