Windows cmd 设置代理
设置 HTTP 代理:
1 | set http_proxy=http://127.0.0.1:7890 & set https_proxy=http://127.0.0.1:7890 |
socks5代理设置:
1 | set http_proxy=socks5://127.0.0.1:7890 |
取消代理:
1 | set http_proxy= |
Git bash 设置代理
设置 HTTP 代理:
1 | git config --global http.proxy http://127.0.0.1:7890 |
设置 socks5代理:
1 | git config --global http.proxy socks5://127.0.0.1:7890 |
取消代理:
1 | git config --global --unset http.proxy |
PowerShell 设置代理
设置 HTTP 代理:
1 | $Env:http_proxy="http://127.0.0.1:7890";$Env:https_proxy="http://127.0.0.1:7890" |
代理测试:
1 | curl https://www.google.com |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 知心 の Blog!
评论
