Mac终端设置代理
12
2022-12-05
Mac终端设置代理
查看代理端口
以clashx为例:混合端口7890
http 代理
export http_proxy="http://127.0.0.1:7890" export https_proxy="http://127.0.0.1:7890"
socks代理
export http_proxy="socks5://127.0.0.1:7890/" export https_proxy="socks5://127.0.0.1:7890/"
设置全部代理
export all_proxy="socks5://127.0.0.1:7890/"
测试
curl -vv https://www.google.com
取消代理
unset http_proxy unset https_proxy unset ALL_PROXY
只用git代理
git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'
- 0
-
分享