# 使用 Homebrew 安装 aria2
brew install aria2
# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description | |
* 如果是家里WI-FI则开启直连模式 | |
* 如果不是家里WI-FI则开启代理模式 | |
*/ | |
const WIFI_DONT_NEED_PROXYS = ['Xiaomi_RQH']; | |
if (WIFI_DONT_NEED_PROXYS.includes($network.wifi.ssid)) { | |
$surge.setOutboundMode('direct'); | |
} else { |