Windows cmd 設(shè)置代理
設(shè)置 HTTP 代理:
set http_proxy=http://127.0.0.1:10899
set https_proxy=http://127.0.0.1:10899
socks5代理設(shè)置:
set http_proxy=socks5://127.0.0.1:10899
set https_proxy=socks5://127.0.0.1:10899
取消代理:
set http_proxy=
set https_proxy=
Windows git bash 設(shè)置代理
設(shè)置 HTTP 代理:
git config --global http.proxy http://127.0.0.1:10899
git config --global https.proxy http://127.0.0.1:10899
設(shè)置 socks5代理:
git config --global http.proxy socks5://127.0.0.1:10899
git config --global https.proxy socks5://127.0.0.1:10899
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
Windows PowerShell 設(shè)置代理
設(shè)置代理:
netsh winhttp set proxy 127.0.0.1:10899
代理測試:
curl https://www.google.com
CMD查看代理情況:
netsh winhttp show proxy
CMD取消代理:
netsh winhttp reset proxy