各种场景配置代理
git bash
// http || https
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890
// sock5代理
git config --global http.proxy socks5 127.0.0.1:7890
git config --global https.proxy socks5 127.0.0.1:7890
// 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
linux terminal
export http_proxy=http://127.0.0.1:7890
export https_proxy=https://127.0.0.1:7890
unset http_proxy
unset https_proxy
windows terminal
配置全局代理即可,不要使用ping命令去ping google.com,因为ping的ICMP协议不走HTTP、HTTPS协议,可以用curl命令