在WSL中使用代理

如果开启代理时打开 WSL ,会提示 “wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。”

参考链接

%USERHOME%/.wslconfig 中添加如下内容

1
2
3
4
5
6
[experimental]
autoMemoryReclaim=gradual | dropcache | disabled
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true