mihomo

command module
v1.19.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: GPL-3.0 Imports: 25 Imported by: 0

README

Meta Kennel
Meta Kernel

Another Mihomo Kernel.

Features

  • Local HTTP/HTTPS/SOCKS server with authentication support
  • VMess, VLESS, Shadowsocks, Trojan, Snell, TUIC, Hysteria protocol support
  • Built-in DNS server that aims to minimize DNS pollution attack impact, supports DoH/DoT upstream and fake IP.
  • Rules based off domains, GEOIP, IPCIDR or Process to forward packets to different nodes
  • Remote groups allow users to implement powerful rules. Supports automatic fallback, load balancing or auto select node based off latency
  • Remote providers, allowing users to get node lists remotely instead of hard-coding in config
  • Netfilter TCP redirecting. Deploy Mihomo on your Internet gateway with iptables.
  • Comprehensive HTTP RESTful API controller

Dashboard

A web dashboard with first-class support for this project has been created; it can be checked out at metacubexd.

Configration example

Configuration example is located at /docs/config.yaml.

Docs

Documentation can be found in mihomo Docs.

For development

Requirements: Go 1.20 or newer

Build mihomo:

git clone https://github.com/MetaCubeX/mihomo.git
cd mihomo && go mod download
go build

Set go proxy if a connection to GitHub is not possible:

go env -w GOPROXY=https://goproxy.io,direct

Build with gvisor tun stack:

go build -tags with_gvisor

IPTABLES configuration

Work on Linux OS which supported iptables

# Enable the TPROXY listener
tproxy-port: 9898

iptables:
  enable: true # default is false
  inbound-interface: eth0 # detect the inbound interface, default is 'lo'

Debugging

Check wiki to get an instruction on using debug API.

Credits

License

This software is released under the GPL-3.0 license.

In addition, any downstream projects not affiliated with MetaCubeX shall not contain the word mihomo in their names.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
common
arc
buf
cmd
lru
net
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
component
ca
ech
memory
Package memory return MemoryInfoStat modify from https://github.com/shirou/gopsutil/tree/v4.25.8/process
Package memory return MemoryInfoStat modify from https://github.com/shirou/gopsutil/tree/v4.25.8/process
nat
tls
wildcard
Package wildcard modified IGLOU-EU/go-wildcard to support:
Package wildcard modified IGLOU-EU/go-wildcard to support:
hub
transport
gun
kcptun
Package kcptun copy and modify from: https://github.com/xtaci/kcptun/tree/52492c72592627d0005cbedbc4ba37fc36a95c3f adopt for mihomo without SM4,QPP,tcpraw support
Package kcptun copy and modify from: https://github.com/xtaci/kcptun/tree/52492c72592627d0005cbedbc4ba37fc36a95c3f adopt for mihomo without SM4,QPP,tcpraw support
vless/encryption
Package encryption copy and modify from xray-core https://github.com/XTLS/Xray-core/commit/f61c14e9c63dc41a8a09135db3aea337974f3f37 https://github.com/XTLS/Xray-core/commit/3e19bf9233bdd9bafc073a71c65b737cc1ffba5e https://github.com/XTLS/Xray-core/commit/7ffb555fc8ec51bd1e3e60f26f1d6957984dba80 https://github.com/XTLS/Xray-core/commit/ec1cc35188c1a5f38a2ff75e88b5d043ffdc59da https://github.com/XTLS/Xray-core/commit/5c611420487a92f931faefc01d4bf03869f477f6 https://github.com/XTLS/Xray-core/commit/23d7aad461d232bc5bed52dd6aaa731ecd88ad35 https://github.com/XTLS/Xray-core/commit/3c20bddfcfd8999be5f9a2ac180dc959950e4c61 https://github.com/XTLS/Xray-core/commit/1720be168fa069332c418503d30341fc6e01df7f https://github.com/XTLS/Xray-core/commit/0fd7691d6b28e05922d7a5a9313d97745a51ea63 https://github.com/XTLS/Xray-core/commit/09cc92c61d9067e0d65c1cae9124664ecfc78f43 https://github.com/XTLS/Xray-core/commit/2807ee432a1fbeb301815647189eacd650b12a8b https://github.com/XTLS/Xray-core/commit/bfe4820f2f086daf639b1957eb23dc13c843cad1 https://github.com/XTLS/Xray-core/commit/d1fb48521271251a8c74bd64fcc2fc8700717a3b https://github.com/XTLS/Xray-core/commit/49580705f6029648399304b816a2737f991582a8 https://github.com/XTLS/Xray-core/commit/84835bec7d0d8555d0dd30953ed26a272de814c4 https://github.com/XTLS/Xray-core/commit/373558ed7abdbac3de41745cf30ec04c9adde604 https://github.com/XTLS/Xray-core/commit/38cc306c955c362f044e074049a5e67b6b9fb389 https://github.com/XTLS/Xray-core/commit/b33555cc0a52d0af3c23d2af8fca42f8a685d9af https://github.com/XTLS/Xray-core/commit/ad7140641c44239c9dcdc3d7215ea639b1f0841c https://github.com/XTLS/Xray-core/commit/0199dea39988a1a1b846d0bf8598631bade40902 https://github.com/XTLS/Xray-core/commit/fce1195b60f48ca18a953dbd5c7d991869de9a5e https://github.com/XTLS/Xray-core/commit/b0b220985c9c1bc832665458d5fd6e0c287b67ae https://github.com/XTLS/Xray-core/commit/82ea7a3cc5ff23280b87e3052f0f83b04f0267fa https://github.com/XTLS/Xray-core/commit/e8b02cd6649f14889841e8ab8ee6b2acca71dbe6 https://github.com/XTLS/Xray-core/commit/6768a22f676c9121cfc9dc4f51181a8a07837c8d https://github.com/XTLS/Xray-core/commit/4c6fd94d97159f5a3e740ba6dd2d9b65e3ed320c https://github.com/XTLS/Xray-core/commit/19f890729656bc923ae3dee8426168c93b8ee9c2 https://github.com/XTLS/Xray-core/commit/cbade89ab11af26ba1e480a3688a6c205fa3c3f8
Package encryption copy and modify from xray-core https://github.com/XTLS/Xray-core/commit/f61c14e9c63dc41a8a09135db3aea337974f3f37 https://github.com/XTLS/Xray-core/commit/3e19bf9233bdd9bafc073a71c65b737cc1ffba5e https://github.com/XTLS/Xray-core/commit/7ffb555fc8ec51bd1e3e60f26f1d6957984dba80 https://github.com/XTLS/Xray-core/commit/ec1cc35188c1a5f38a2ff75e88b5d043ffdc59da https://github.com/XTLS/Xray-core/commit/5c611420487a92f931faefc01d4bf03869f477f6 https://github.com/XTLS/Xray-core/commit/23d7aad461d232bc5bed52dd6aaa731ecd88ad35 https://github.com/XTLS/Xray-core/commit/3c20bddfcfd8999be5f9a2ac180dc959950e4c61 https://github.com/XTLS/Xray-core/commit/1720be168fa069332c418503d30341fc6e01df7f https://github.com/XTLS/Xray-core/commit/0fd7691d6b28e05922d7a5a9313d97745a51ea63 https://github.com/XTLS/Xray-core/commit/09cc92c61d9067e0d65c1cae9124664ecfc78f43 https://github.com/XTLS/Xray-core/commit/2807ee432a1fbeb301815647189eacd650b12a8b https://github.com/XTLS/Xray-core/commit/bfe4820f2f086daf639b1957eb23dc13c843cad1 https://github.com/XTLS/Xray-core/commit/d1fb48521271251a8c74bd64fcc2fc8700717a3b https://github.com/XTLS/Xray-core/commit/49580705f6029648399304b816a2737f991582a8 https://github.com/XTLS/Xray-core/commit/84835bec7d0d8555d0dd30953ed26a272de814c4 https://github.com/XTLS/Xray-core/commit/373558ed7abdbac3de41745cf30ec04c9adde604 https://github.com/XTLS/Xray-core/commit/38cc306c955c362f044e074049a5e67b6b9fb389 https://github.com/XTLS/Xray-core/commit/b33555cc0a52d0af3c23d2af8fca42f8a685d9af https://github.com/XTLS/Xray-core/commit/ad7140641c44239c9dcdc3d7215ea639b1f0841c https://github.com/XTLS/Xray-core/commit/0199dea39988a1a1b846d0bf8598631bade40902 https://github.com/XTLS/Xray-core/commit/fce1195b60f48ca18a953dbd5c7d991869de9a5e https://github.com/XTLS/Xray-core/commit/b0b220985c9c1bc832665458d5fd6e0c287b67ae https://github.com/XTLS/Xray-core/commit/82ea7a3cc5ff23280b87e3052f0f83b04f0267fa https://github.com/XTLS/Xray-core/commit/e8b02cd6649f14889841e8ab8ee6b2acca71dbe6 https://github.com/XTLS/Xray-core/commit/6768a22f676c9121cfc9dc4f51181a8a07837c8d https://github.com/XTLS/Xray-core/commit/4c6fd94d97159f5a3e740ba6dd2d9b65e3ed320c https://github.com/XTLS/Xray-core/commit/19f890729656bc923ae3dee8426168c93b8ee9c2 https://github.com/XTLS/Xray-core/commit/cbade89ab11af26ba1e480a3688a6c205fa3c3f8
vless/vision
Package vision implements VLESS flow `xtls-rprx-vision` introduced by Xray-core.
Package vision implements VLESS flow `xtls-rprx-vision` introduced by Xray-core.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL