在 .zshrc
文件中加入两个方法:
proxy_on() {
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
echo "proxy on"
}
proxy_off() {
unset https_proxy http_proxy all_proxy
echo "proxy off"
}
proxy_on # 默认开启代理设置