Windows 步骤

安装 nssm 并配置服务

1
2
3
4
nssm.exe install mihomo
Application里
path选择mihomo.exe完整路径, dir选择所在的目录, arguments填写-f config.yaml完整路径
install service

mihomo 关键配置

1
2
3
4
external-ui: ./ui
external-ui-name: xd
# 目前支持下载zip,tgz格式的压缩包
external-ui-url: "https://gh-proxy.org/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"

Mac 步骤

安装 mihomo 服务并配置

安装

1
2
3
4
5
# homebrew
brew install mihomo

# macports
sudo port install mihomo

配置

1
2
# 把 iCloud 的配置文件链接到指定目录 (可选)
ln -s ~/Library/Mobile\ Documents/iCloud\~com\~metacubex\~ClashX/Documents /opt/local/etc/mihomo/config.yaml

Macports

1
2
3
4
5
6
7
8
## 启动服务 + 开机启动
sudo port load mihomo

## 重启服务
sudo port reload mihomo

## 关闭服务
sudo port unload mihomo

Homebrew

1
2
3
4
5
6
7
8
## 启动服务 + 开机启动
sudo brew services start mihomo

## 重启服务
sudo brew services restart mihomo

## 关闭服务
sudo brew services stop mihomo