mihomo core vs. the original Clash: protocol support, rule sets, and configuration changes
Compare mihomo with the original Clash core, including added protocols, rule-provider syntax, domain sniffing, TUN improvements, and the configuration fields to update when migrating.
Original Clash vs. Premium vs. mihomo
The original Clash refers to Dreamacro’s open-source core. Clash Premium was a separate release line from the same project, with features such as TUN and rule providers. mihomo, formerly known as Clash.Meta, is a fork that retains Clash’s YAML configuration structure while extending support for proxy protocols, domain sniffing, and TUN settings. If an older guide says “Clash supports TUN,” check which core it means.
Clash for Windows is a discontinued graphical client, not the name of a core. For example, 0.20.39 is a Clash for Windows client version; it does not tell you whether the core currently running supports a particular field. Before migrating, check the core name and version on the target client’s About page or in its core logs. If you have a standalone mihomo executable, you can also run .\mihomo.exe -v. A client’s ability to import YAML does not mean every core it bundles can parse that YAML.
Proxy protocol support: check each node’s type
When comparing configurations, check the type of each node under proxies, as well as the node files loaded by proxy-providers. If the main configuration contains only groups and rules, an unsupported node may be tucked away in a remote provider and only trigger an error when that provider updates.
| Node type | What to check when migrating |
|---|---|
ss、vmess、trojan | Both cores have implementations for these protocols, so the basic fields can usually stay as they are. Check each node’s encryption method, transport, and TLS settings. |
vless | Not supported by the original open-source Clash. After migrating to mihomo, check the transport settings as well. For nodes using REALITY, also verify reality-opts and the server parameters. |
hysteria2、tuic | Not supported by the original open-source Clash. With mihomo, check the protocol parameters and implementation version. When troubleshooting, also make sure the UDP path to the server is working. |
If the logs report an unknown node type, first confirm that mihomo is running, then check that the version supports the node syntax you’re using. Changing type: vless to type: vmess, or hysteria2 to hysteria, won’t convert the server-side protocol. If the node loads but connections time out, check the address, port, authentication, TLS, and network reachability separately—don’t assume every connection failure is a configuration-format error.
rule-providers: rule file formats, match types, and order
rule-providers defines where a rule set comes from; RULE-SET in rules determines what happens when it matches. If an older Premium configuration already uses this structure, you can usually keep the provider names and rule order when migrating to mihomo. A legacy configuration with only a standard rules list doesn’t need to be split into providers just for the migration.
Validate references with a local YAML file
rule-providers:
internal-domains:
type: file
behavior: domain
format: yaml
path: ./rules/internal-domains.yaml
rules:
- RULE-SET,internal-domains,DIRECT
- MATCH,DIRECT
Create rules/internal-domains.yaml in the core’s data directory with the contents below. example.net is used for demonstration. Both rules send matching traffic directly, so you can distinguish rule-set matches from fallback traffic in the connection log without changing the outbound route.
payload:
- '+.example.net'
- Know the difference between
behaviorandformat: Usedomainfor domain-matching entries,ipcidrfor IP ranges, andclassicalfor entries that include rule types, such asDOMAIN-SUFFIX,example.net.yaml,text, andmrsspecify the file format. In mihomo,mrsworks withdomainandipcidr, but notclassical. Changing the file extension does not convert its format. - Distinguish the remote URL from the local path: With
type: http,urlis the rule-set source andpathis where the file is saved locally.intervalis in seconds—for example,86400means one day. When switching clients, check the new core’s data directory; a relative path is not necessarily relative to the subscription file’s location. - Distinguish successful loading from an active match: In rule mode, rules are evaluated in order. First check that the provider loads, then make sure the
RULE-SETreference matches the provider key and appears beforeMATCH. If a broader rule earlier in the list matches first, a later rule set won’t be used even if it loaded successfully.
Domain sniffing: test it separately only when connections show an IP
When an app passes a domain directly to the proxy, the core usually already has the information needed for domain-based rules. A connection captured by TUN, however, may include only the destination IP. mihomo’s sniffer can try to extract domain information from HTTP requests, TLS handshakes, or QUIC initial handshakes. Whether it can do so depends on the protocol, configured port ranges, and the information available in the connection. It is not a DNS resolver and does not decrypt HTTPS content.
sniffer:
enable: true
parse-pure-ip: true
override-destination: false
sniff:
HTTP:
ports: [80, 8080]
TLS:
ports: [443]
QUIC:
ports: [443]
This snippet only inspects the listed ports. parse-pure-ip lets mihomo try sniffing traffic whose destination is an IP address. override-destination: false means the sniffed domain won’t replace the actual connection destination. During migration, compare connection logs with the setting on and off: does the same destination previously match an IP rule or fallback, and does it match the expected domain rule afterward? If the log still shows only an IP, first check whether the traffic passes through the core and whether its port is in range, then check whether the handshake provides a domain.
Migrating TUN on Windows 11: test traffic capture and DNS separately
System proxy uses Windows proxy settings to route traffic from apps that honor them through a local proxy port. TUN captures traffic through a virtual network interface and system routes. An old Premium configuration containing tun does not mean a new client will enable it the same way. The GUI may have its own TUN toggle, permission controls, and configuration overrides. When troubleshooting, rely on the effective configuration the client passes to the core and the startup logs.
tun.stack- Choose a TUN network stack. mihomo supports
system,gvisor, andmixed. Keep the new client’s default during migration. Once you can reproduce an issue, change only one stack at a time and test both web browsing and apps that rely on UDP. tun.auto-routeandtun.auto-detect-interface- The first setting controls automatic route configuration; the second detects the outbound interface automatically. If your company VPN or LAN services stop working after you enable TUN, disable TUN first to see whether they recover, then check the routes and outbound network adapter. Don’t switch nodes as your first step.
tun.dns-hijackanddns- The first setting specifies which DNS requests the core intercepts. For example,
any:53matches UDP DNS requests sent to port 53. The second defines how the core resolves DNS. This example does not intercept encrypted DNS that a browser sends over HTTPS. If an older configuration relies on corporate DNS or usesfake-ip, test internal domain names, public domain names, and LAN IP addresses separately.
Which fields should you keep or change when migrating?
- Copy the configuration first and keep policy group names unchanged. The basic
proxies,proxy-groups, andrulessections can usually be carried over. If you rename a group, update rules and other groups that refer to it. For configurations that update automatically from a subscription, use the client’s override feature; otherwise, the next update may overwrite your manual changes. - Change listening ports only if needed.
portis the HTTP proxy port,socks-portis the SOCKS proxy port, andmixed-portaccepts both on the same port. You don’t need to replace one with another. If the old client is still using the example port7890, exit it or assign a free port to the new client, then update the system or app proxy settings to match. - Update nodes and rule sets only when you need newer features. When adding a node that uses a new protocol, check its
typeand protocol parameters. When switching rule-set formats, verifybehavior,format, and the file contents together. Don’t change the core, subscription, and rule sources in the same test; otherwise, it’s hard to tell which change caused the problem. - Validate the configuration, then enable changes to
dns,sniffer, andtunone at a time. If you have a standalone core executable, run the check command below in PowerShell from its directory. After it passes, use the client’s effective configuration to test node connections, rule matches, and system routes. A successful command does not verify those runtime behaviors.
.\mihomo.exe -t -f .\config.yaml
If the old configuration uses only common node types, simple rules, and a local proxy port, switching cores may not require rewriting the YAML. Keep the existing rules and groups where possible, and test their behavior one item at a time. Change fields only when you run into an unsupported protocol, a rule file format change, or a real need to handle connections that expose only an IP address.