Mihomo
开源代理内核 · 亦称 Clash.Meta / Clash Meta
Mihomo(曾称 Clash.Meta)是 MetaCubeX 维护的开源规则代理内核,延续 Dreamacro Clash 内核确立的规则分流路线。它用 YAML 连接规则、策略组、节点来源与 DNS:规则可指向具体节点、策略组或直连出口;指向策略组时,再由组内策略选择实际出口。通过 TUN 接入的系统流量也能沿用这套分流过程。
内核能力
按官方文档与发行资产逐项核验的能力总览;各项机制的工作方式见下方「内核介绍」。
出站协议
- Shadowsocks
- ShadowsocksR
- VMess
- VLESS
- Trojan
- Hysteria
- Hysteria 2
- TUIC
- WireGuard
- SSH
- SOCKS5
- HTTP
- Mieru
- AnyTLS
- Snell
- OpenVPN
- MASQUE
- ShadowQUIC
- TrustTunnel
- Sudoku
- Tailscale
- ZeroTier
- EasyTier
- DNS
- DIRECT / REJECT
按官方文档逐一核验的出站代理类型;各类协议的传输层与参数以官方文档为准。
核验于官方来源入站类型
- HTTP
- SOCKS5
- Mixed
- TUN
- Redirect
- TPROXY
- Tunnel
- Shadowsocks
- VMess
- VLESS
- Trojan
- Hysteria 2
- TUIC(v4 / v5)
- AnyTLS
- Mieru
- Snell
- ShadowQUIC
- Sudoku
- TrustTunnel
监听器入站与协议入站;TUN 接管的系统流量沿用同一套分流规则。
核验于官方来源规则与 DNS
- DOMAIN 系列匹配
- GEOSITE
- GEOIP / IP-CIDR / IP-ASN
- RULE-SET
- SUB-RULE
- AND / OR / NOT 逻辑规则
- 进程匹配
- Fake-IP
- DoH / DoT / DoQ
- nameserver-policy
- hosts 映射
规则类型、规则集格式与 DNS 能力均来自官方配置文档的固定版本。
核验于官方来源平台与安装形态
- Windows
- macOS
- Linux
- Android
- FreeBSD
单二进制压缩包分发;v1.19.33 发行页含 127 个资产,覆盖多架构与旧工具链兼容构建,以发行页资产为准。
核验于官方来源发展历程
沿革时间线按可核验事件整理;Clash 内核由 Dreamacro 开源并确立规则分流路线,2023 年 11 月原版仓库删除后,MetaCubeX 的 Clash.Meta 更名为 mihomo 延续开发。
Clash 把规则路由带到多协议核心 →
Go 模块存档保留了 Clash v0.3.2 的发布记录。项目把自己定义为“基于规则的隧道”,同时支持 Shadowsocks、VMess 等出站,并把规则、策略组、Fake-IP DNS 与控制 API 作为主要能力。
Go 模块:Clash README 存档MetaCubeX 内核仓库可追溯的最早发行(v1.8.0) →
MetaCubeX 的内核仓库(后更名为 mihomo)在 GitHub Release 记录中可追溯至 2021 年 12 月 21 日发布的 v1.8.0,发行说明记录了 Rule-Set 支持与 VLESS 修复;仓库创建时间为 2021 年 5 月 20 日(GitHub API)。
GitHub:v1.8.0 发行记录原版 Clash 核心仓库被删除 →
同期汇总记录 Dreamacro/clash 核心仓库于北京时间 2023 年 11 月 3 日被删除。此前一天,11 月 2 日,Clash for Windows 客户端的发布仓库已被删除;两者分别是客户端与代理核心,维护和分发各自独立。
net4people/bbs:2023 年 11 月项目变动汇总Clash.Meta 更名为 mihomo →
存档快照显示,MetaCubeX/Clash.Meta 仓库页面在 2023 年 11 月 18 日仍以原名称访问,2023 年 11 月 30 日同一地址开始重定向到 mihomo;更名发生在这一窗口内,此后 mihomo 成为该内核的正式名称。
Wayback:2023-11-18 仍以 Clash.Meta 访问Mihomo 发布 v1.18.0 并确立后 Clash 时代核心地位 →
MetaCubeX 团队发布 Mihomo v1.18.0,正式确立自 Clash 闭源及停更后的开源延续核心地位。该版本统一了开源代码库与此前闭源的 Premium TUN 特性,被几乎所有主流图形客户端迅速采纳。
GitHub:Mihomo v1.18.0 发布记录Mihomo 发布 v1.19.0 →
Mihomo 于 2024 年 12 月 9 日发布 v1.19.0,开启当前仍在延续的 v1.19 版本线;本站目录展示的稳定版本随该线的正式发行持续更新。
GitHub:Mihomo v1.19.0 发行记录
版本与发行节奏
查看官方发行记录当前稳定版本
版本号、日期和变更正文以对应发行记录为准;使用该内核的应用可能仍停留在其他版本。
面板生态
与该内核有可核验关系的面板与工具;每条附关系依据来源,排名不分先后。
内核介绍
以下章节展开解释各项能力的实际机制;快速事实总览见上方「内核能力」矩阵。
域名规则与策略组的分工
在 rule 模式下,rules 按配置顺序检查域名、IP、进程等条件,把匹配的连接交给节点、策略组或 DIRECT、REJECT 等出口。以说明性规则“DOMAIN-SUFFIX,example.com,工作”为例,example.com 及其子域的连接会交给“工作”组,再由组内策略选节点。更换工作组的节点时可以保留这条域名规则;同一配置因而能分别组织办公、影音和直连流量。
查看来源自动选路、备用出口与负载分配
select 用于手动选节点或其他策略组;url-test 依据指定测试地址的延迟选择节点,tolerance 容差可减少小幅延迟变化带来的切换;fallback 则优先使用列表中靠前且健康检查可用的节点。需要分配连接时,load-balance 提供 round-robin 轮询、consistent-hashing 一致性哈希和 sticky-sessions 黏性会话。健康检查反映到测试地址的连通性与延迟,实际下载吞吐量仍需另测;这些策略选择连接出口,单条连接仍由其选中的节点承载。
查看来源节点订阅与规则集可以分开维护
proxy-providers 引入节点列表,策略组通过 use 引用,并可按节点名称筛选候选;rule-providers 引入匹配条件,再由 RULE-SET 规则指定这些条件应交给哪个出口。这样,服务商更换节点、规则作者更新域名分类与用户调整出口偏好可以分别进行。规则集按内容分为 domain、ipcidr 和 classical;MRS 二进制规则格式只支持前两类,含其他规则类型的 classical 内容需使用适合它的格式。
查看来源不同协议共用策略,节点参数分别保留
Shadowsocks、Trojan、VLESS、Hysteria 2、TUIC 等出站可以交给同一套规则和策略组管理,连接各节点所需的参数则各有含义。官方 VLESS/REALITY TCP 示例包含 UUID、Vision flow、服务器名、公钥和 short-id,并要求提供 client-fingerprint;Hysteria 2 使用自己的密码与传输选项;TUIC v4 使用 token,v5 使用 UUID 与密码。导入或转换节点时需要保留对应协议和服务端版本的参数,单有“支持 VLESS”或“支持 TUIC”的标签不足以表达完整配置。
查看来源Fake-IP 怎样保留域名信息
启用 Fake-IP 后,内置 DNS 为域名分配虚拟地址并保存映射;官方示例使用 198.18.0.1/16 地址池。应用连接这个地址时,Mihomo 查回原域名,再交给域名规则和所选出口处理。这使透明接管进来的连接仍能按域名分流。需要返回真实解析结果的域名,可在 blacklist 过滤模式下列入 fake-ip-filter;redir-host 则沿用真实解析结果及地址映射。Fake-IP 依赖 DNS 与连接都经过相应处理,应用自行加密查询时需另外考虑域名信息的获取。
查看来源域名用哪个 DNS,DNS 连接走哪个出口
nameserver-policy 按域名或规则集选择解析服务器,适合让内部域名交给内网 DNS、其他域名交给另一组解析器。解析服务器可以使用 DoH、DoT 等传输;DNS 查询本身若也需要按路由规则选出口,可配置 respect-rules。官方配置要求此时提供 proxy-server-nameserver,单独处理代理节点域名的解析;default-nameserver 则用于解析 DNS 服务器自身的域名。排查 DNS 时,可以依次确认业务域名交给哪个解析器、查询连接经哪个出口、节点与解析器自身的域名又由谁解析。
查看来源从应用代理入口到 TUN 接管
mixed-port 可以在同一端口接收 HTTP(S) 与 SOCKS 请求,适合能设置代理地址的应用。需要让未显式设置代理的流量进入内核时,可以使用 TUN 虚拟网卡,配合 auto-route 配置系统路由、dns-hijack 接收指定的 DNS 流量。Linux 还提供 auto-redirect;route-address-set 可按 IP 规则集限定接管范围,route-exclude-address-set 让匹配流量绕过。这两项需要 Linux、nftables,并启用 auto-route 与 auto-redirect。部署到路由器时,这些系统条件会直接决定哪些接管方式可用。
查看来源面板控制与图形客户端各自负责什么
external-controller 提供控制接口,external-ui 指定网页面板文件;官方 README 列出的 metacubexd 是可配合使用的独立面板。HTTP 控制接口可通过 secret 使用 Bearer 认证,局域网访问范围由监听设置决定。桌面或手机客户端在此之外还负责订阅导入、界面、权限和系统代理或 VPN 集成。选择客户端时需要查看它实际携带的内核版本及开放的配置项;Mihomo 的配置能力与客户端的可操作界面分别由两边实现。
查看来源v1.19.33 改变了哪些使用行为
本版新增 TUN 的 dns-mode:disabled 不改系统 DNS,native 将 TUN 地址设为系统 DNS,hijack 在此基础上拦截发往其他网卡的 53 端口流量;其中 Windows 需要 strict-route,Linux 需要 auto-redirect。官方发行说明还列出重载时保留 Fake-IP 分配状态、修复不足一毫秒的 URL 测试被判为失败,以及限制已放弃 DoH 查询的连接积压等修复。这些变化分别影响 DNS 接管、配置重载和健康检查,升级后值得核对已有 TUN 与 DNS 设置。
查看来源源码、许可与下游命名
Mihomo 源码附带 GPL v3 许可证正文,README 另声明与 MetaCubeX 无关的下游项目名称不得包含 mihomo 一词。复用源码、分发修改版或为下游项目命名时,需要一并阅读这两处声明。采用 Mihomo 的图形客户端还包含自己的界面和平台集成代码,其源码与许可另行记录在相应应用页面。
查看来源关联应用 64
依据本站应用内核记录关联。多内核、派生内核、平台差异及所有者更正的核验范围,详见各应用页面。
Clash Verge Rev
Windows · macOS · Linux
MihomoFlClash
Android · Windows · macOS · Linux
MihomoSlClash
Android
MihomoClash Meta for Android
Android
MihomoPharos Pro
iOS
MihomoOpenClash
OpenWrt
MihomoClash Party
Windows · macOS · Linux
MihomoShellCrash
Linux · OpenWrt
Mihomo / sing-boxClash Nyanpasu
Windows · macOS · Linux
Mihomo / Clash Premium / clash-rs(稳定版)Sparkle
Windows · macOS · Linux
MihomoClashX Meta
macOS
MihomoNikki
OpenWrt
MihomoClashN
Windows
MihomoClash Mi
Android · iOS · Windows · macOS · Linux
MihomoShadowSocksR Plus+
OpenWrt
Xray / Mihomo / Shadowsocks 等组件Bettbox
Android · Windows · macOS · Linux
MihomoGUI.for.Clash
Windows · macOS · Linux
MihomoSurfing
Android
MihomoFlyClash 桌面版
Windows · macOS · Linux
MihomoFlyClash Android
Android
MihomoBox4Magisk
Android
Mihomo / sing-box / V2Ray / Xray / Clash 等(需自备核心)Box for Android
Android
Mihomo / sing-box / Xray / V2RayFlClashX
Android · Windows · macOS · Linux
MihomoToMoon
Linux
MihomoClashBar
macOS
MihomoConnect Now
iOS
MihomoNextin
iOS · tvOS
MihomoPandora Box
Windows · macOS · Linux
MihomoClashMac
macOS
MihomoStelliberty
Windows · macOS · Linux
MihomoStelliberty Android
Android
Mihomo(Mishka 分支)YumeBox
Android
MihomoMikuBox for Android
Android
Miku 分支:Mihomo / UwU 分支:sing-boxAsteriskMETA
Android
MihomoClashTui
Linux · Windows · macOS
Mihomo / sing-boxSatelite
macOS · Windows · Linux
sing-box / Xray / MihomoAnyPortal
Android · Windows · macOS · Linux
Xray / V2Ray / sing-box / Clash / MihomoClash by Hako
iOS · macOS · tvOS
MihomoEverywhere
iOS
Xray / sing-box / MihomoKumoApp
macOS
MihomoClash MIX
Android
MihomoClashBox
HarmonyOS
MihomoClashFest
Android
MihomoNekoBox for OpenWrt
OpenWrt
Mihomo / sing-boxFlClash OpenHarmony
HarmonyOS
Mihomo(tljk/Clash.Meta 社区分支)FullCombo Shark
OpenWrt
MihomoNeko for OpenWrt
OpenWrt
Mihomo / sing-boxMonadBox
Android
Mihomoclash-xiaoy
Windows · macOS · Linux
MihomoakashaProxy
Android
MihomoClash Lite
iOS
MihomoLinkClashX
iOS · tvOS
MihomoInterstellar
Android
sing-box / Mihomo / XraySSRVPN
Android · Windows · macOS
MihomoClash Plus
iOS · Android · Windows · macOS
MihomoPanVell
iOS
MihomoMagic Catling2
Asuswrt-Merlin
Mihomoluci-app-meta
OpenWrt
MihomoClashoo
OpenWrt
Mihomo / sing-boxTunBox
Windows · HarmonyOS
MihomoNexus
Android
MihomoFluxora
Android · Windows · macOS · Linux
MihomoClash of Rust
Windows · macOS · Linux · Android
MihomoAngela Mihomo
Android · Windows · macOS · Linux
Mihomo(Angela Mihomo 内置分支)关联人物
项目贡献者与相关应用作者分开列出;应用作者不因此被视为内核开发者。
上游项目与核心贡献
相关应用的开发者
通过下方应用的已登记作者关联,不表示这些作者参与了内核开发。
版本更新
Mihomo 发布 v1.19.31
Mihomo 发布 v1.19.31,新增 EasyTier 出站、TUN 的 stack: mips 配置及 ZeroTier 的 identity-secret 支持;修复 Hysteria UDP、Tailscale 分流 DNS、VLESS 解密清理与域名规则匹配等问题,并降低 gVisor、mipstack 等组件的内存开销。
官方变更日志 · 预览@MetaCubeX查看完整动态What's Changed
- dca26db0 feat: add EasyTier outbound (#3194) by @MiaM1ku
- ab405bad feat: support stack: mips in tun configuration by @wwqgtxx
- 390870c7 feat: support identity-secret for ZeroTier by @wwqgtxx
BUG & Fix
- 0159cf47 fix: restore hysteria v1 udp handling (#3178) by @Chenx Dust
- 04366507 fix: close connection after error handling in doq by @wwqgtxx
- 06b2c5b8 fix: close connection after error handling in mkcp outbound by @wwqgtxx
- 127b1392 fix: split-DNS UDP queries fail silently in tsnet mode when upstream is a tailnet peer by @wwqgtxx
- 187c6342 fix: close connection after error handling in snell outbound by @wwqgtxx
- 1cdca1a0 fix: handle decryption handshake errors in server by @wwqgtxx
- 20bcda2d fix: avoid VLESS decryption cleanup panic (#3195) by @浅小沫
- 5183232e fix: RandomPaddingAddition and DisableCookies for AmneziaWG v3 by @wwqgtxx
- 5f951098 fix: DomainSet wildcard matching with overlapping rules by @wwqgtxx
- 634b3199 fix: hysteria2 UDP sessions not closed on connection close by @wwqgtxx
- 68ec4fae fix: ipv6 url parse in xhttp (#3160) by @CyberVacation
- 6d179a1c fix: openvpn derive the tls-auth HMAC digest from auth instead of hard-coding SHA-1 (#3189) by @Token
- 77b9393c fix: preserve domain rules across Foreach round trips by @wwqgtxx
- 78210c9c fix: close connection after error handling in kcptun by @wwqgtxx
- 7d7532d4 fix: error using of safeConnClose in sudoku outbound by @wwqgtxx
- 94ccba56 fix: mieru listener doesn't obey "listen" config (#3205) by @enfein
- 99c49780 fix: prevent nil pointer dereference in WireGuard initialization (#3148) by @Sinspired
- a91201f1 fix: correct android amd64 core asset name in updater (#3167) by @NuoFang
- c0e43ebe fix: tailscale should always use UserDial for upstream TCP DNS server by @wwqgtxx
- d5f57a5e fix: missing NeedHandshake for shadowsocks none by @wwqgtxx
- dc66a8a1 fix: close connection after error handling in handleContextListener by @wwqgtxx
- e0f1d2b2 fix: close udp endpoint in mieru server by @wwqgtxx
- faeb537a fix: close connection after error handling in tuic server by @wwqgtxx
- fb66af81 fix: typo in config.yaml (#3145) by @Kosta
- fd74ecb6 fix: trusttunnel client not waiting for TCP connection established by @wwqgtxx
Maintenance
- 061966e7 chore: OpenVPN no longer relies on the underlying conn deadline functions by @wwqgtxx
- 2ecceb5b chore: improve mipstack under device backpressure by @wwqgtxx
- 2f7eae5a chore: report detailed errors for invalid Clash-style domain patterns by @wwqgtxx
- 2fe7ecbf chore: change yaml library to go.yaml.in/yaml/v3 by @wwqgtxx
- 4aa9cc17 chore: avoid redundant select calculations in DomainSet by @wwqgtxx
- 4dfaa902 chore: align the APIs between mipstack and gvisor by @wwqgtxx
- 518c7036 chore: convert support REALITY ML-KEM option (#3199) by @Aethersailor
- 6087521e chore: avoid a separate rule slice in DumpMrs by @wwqgtxx
- 65287f0e chore: reduce memory usage in converter (#3159) by @beck
- 8e2f18a1 chore: avoid redundant rank calculations in DomainSet by @wwqgtxx
- 8e6738fa chore: update tailscale to v1.102.3 by @wwqgtxx
- 8f54283e chore: updated sudoku to v0.5.0 (#3187) by @saba-futai
- 92433dba chore: reduce gVisor memory usage by @wwqgtxx
- b59a7e7b chore: sharing synthetic datasets used for build benchmarking by @wwqgtxx
- bbb8cb92 chore: add standalone DomainSetBuilder by @wwqgtxx
- c210be21 chore: buffer geodata reads with a 16 KiB reader (#3185) by @Huffer
- d37f58e7 chore: add new DomainMap implement based on succinct DomainSet by @wwqgtxx
- dd26c524 chore: reduce connection memory and actor stack overhead for mipstack by @wwqgtxx
- ebf82e29 chore: reuse queues during DomainSet build by @wwqgtxx
- f295ba6d chore: update mipstack for api adjustment by @wwqgtxx
- f6a038ce chore: add some benchmark code for new DomainMap by @wwqgtxx
- fe22fdd2 chore: update mieru version (#3119) by @enfein
