WIN终端代理
PowerShell
$Env:http_proxy="http://127.0.0.1:7890";$Env:https_proxy="http://127.0.0.1:7890"- 测试:
Invoke-WebRequest -Uri "https://www.google.com" netsh winhttp show proxynetsh winhttp set proxy proxy-server="http=代理地址:端口;https=代理地址:端口"curl ifconfig.me- 移除:
netsh winhttp reset proxy
CMD
set http_proxy=http://127.0.0.1:7890 & set https_proxy=http://127.0.0.1:7890- 测试
curl -I https://www.google.com
MSYS2
export http_proxy=http://127.0.0.1:7890export https_proxy=http://127.0.0.1:7890- 测试:
curl -I https://www.google.com - 移除:
unset http_proxyunset https_proxy - 每次重启应该重新设置