A TUI client for Mihomo (Clash Meta) built with Rust and Ratatui.
cargo install --path .Ensure Mihomo is running with external controller enabled.
If you don't have a mihomo core running, you can use docker to quick start one.
Here is an example docker-compose.yml file to start a mihomo core using tun mode.
services:
mihomo:
image: metacubex/mihomo:latest
container_name: mihomo
restart: always
network_mode: host
volumes:
- ./config.yaml:/root/.config/mihomo/config.yaml
cap_add:
- NET_ADMIN
devices:
- /dev/net/tunAnd you could edit config.yaml to add some proxy providers or rules.
Here is also an example:
log-level: error
external-controller: 0.0.0.0:9090
secret: mihomo
mixed-port: 7890
mode: rule
tun:
enable: true
stack: system
auto-route: true
auto-detect-interface: true
dns-hijack: ["any:53"]
dns:
enable: true
enhanced-mode: fake-ip
nameserver: [223.5.5.5, 119.29.29.29]
proxy-providers:
MyProxies:
type: http
url: "https://www.example.com"
interval: 3600
path: ./proxies/myproxies.yaml
health-check:
enable: true
interval: 3600
url: http://www.gstatic.com/generate_204
proxy-groups:
- name: 🚀 Proxy
type: select
use:
- MyProxies
rules:
- GEOIP,CN,DIRECT
- MATCH,🚀 ProxyTo run mihomot, just type this command to open the tui if you have installed.
mihomotYou can override the default connection settings using command-line arguments:
-U, --url <URL>: Temporary API URL (e.g.,http://192.168.1.5:9090)-S, --secret <SECRET>: Temporary API Secret--version: Show version information--help: Show help message
Example:
mihomot -U http://192.168.1.100:9090 -S mysecretApp settings are stored in ~/.config/mihomot/settings.json.
Default configuration:
{
"base_url": "http://127.0.0.1:9090",
"api_secret": "mihomo",
"test_url": "https://www.google.com",
"test_timeout": 3000
}These can be configured within the application Settings view.
General
q: Quitj/Down: Next itemk/Up: Previous items: Open Settingsr: Refresh data
Main View
h/Left: Focus Groups listl/Right: Focus Proxies listEnter: Select group (in Groups) or Select proxy (in Proxies)t: Test Latency (Google)i: Show Proxy Info popup
Settings View
Esc/q/s: Close SettingsEnter: Edit value or Toggle option
Editing
Enter: SaveEsc: Cancel