mac 命令行代理脚本
# 开启代理 function on(){ export ALL_PROXY=socks5://127.0.0.1:1080 export http_proxy=http://127.0.0.1:1081 export https_proxy=http://127.0.0.1:1081 echo -e "已开启代理" } # 关闭代理 function off(){ unset ALL_PROXY unset http_proxy unset https_proxy echo -e "已关闭代理" } # 执行proxy_off,默认关闭,也可以默认开启 on
测试
curl cip.cc