前言

Mac 上的代理工具实在都是一坨狗屎,与其用 GUI 受气,不如直接裸核跑 mihomo

  • Surge 不支持 Vless,而且我偶尔还莫名其妙会断网
  • sparkle 我在 Windows 下用的还可以,在 Mac 也总是莫名其妙断网
  • Loon Mac 版依旧测试中
  • Shadowrocket 和 sing-box 则是规则不是那么全

安装

1
brew install mihomo

安装完内核在

1
/opt/homebrew/opt/mihomo/bin/mihomo

配置文件在

1
/opt/homebrew/etc/mihomo/config.yaml

配置

  1. 手动安装下 zashboard,以后就用网页面板管理

    1
    2
    3
    4
    5
    6
    # 前往配置文件夹
    cd /opt/homebrew/etc/mihomo
    # 下载 zashboard
    wget https://github.com/Zephyruso/zashboard/archive/refs/heads/gh-pages.zip
    # 解压
    ditto -x -k zashboard-gh-pages.zip mv
  2. 编辑 config.yaml

    参考:https://raw.githubusercontent.com/FaithAluten/Profile/refs/heads/main/Clash/Config/config.yaml

  3. 运行

    1
    sudo mihomo -d /opt/homebrew/etc/mihomo

    停止就 control + c,或者杀掉 mihomo 进程(活动监视器或者 CLI 都行)

  4. 访问 http://127.0.0.1:9090/ui/#/proxies 即可管理