0%

Linux下各项代理设置

GIT

设置

1
2
3
4
5
# 只对github生效
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
# 对所有生效
git config --global http.proxy http://127.0.0.1:8118
git config --global https.proxy http://127.0.0.1:8118

取消

1
2
3
4
5
# 只对github生效
git config --global --unset http.https://github.com.proxy
# 对所有生效
git config --global --unset http.proxy
git config --global --unset https.proxy

WGET

1
2
3
4
5
# cat ~/.wgetrc
use_proxy=yes
http_proxy=http://127.0.0.1:8118
https_proxy=http://127.0.0.1:8118
no_proxy=".local"

系统

设置

1
2
3
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export no_proxy=".local"

取消

1
2
3
unset http_proxy
unset https_proxy
unset no_proxy