window cmd 命令行中指定代理
VPN 需要支持
测试能否访问 Google
curl -I https://www.google.com
在 CMD 中临时设置代理
set http_proxy=http://127.0.0.1:7897
set https_proxy=http://127.0.0.1:7897
----- 个人设置 —
让WIN11走windows的代理
把 WSL 切到 mirrored 网络模式,自动镜像代理
在 Windows 用户目录创建/编辑 %UserProfile%.wslconfig,内容:
[wsl2]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
重新加载 WSL:
wsl --shutdown
wsl -d Ubuntu