设置代理

http代理

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

socks5代理

git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
取消设置
git config --global --unset http.proxy
git config --global --unset https.proxy
仅代理GitHub
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080

取消设置

git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
设置需要密码的代理
git config --global http.proxy http://username:passwd@127.0.0.1:1080
git config --global http.proxy socks5://username:passwd@127.0.0.1:1080
curl使用代理
curl -x socks5://127.0.0.1:10808 https://www.google.com