0%

wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。

wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。

新配置完wsl之后,启动WSL的时候出现了一个提示

1
2
wsl: 检测到 localhost 代理配置,但未镜像到 WSL
NAT 模式下的 WSL 不支持 localhost 代理。

遂google,得知解决方法如下

解决方法

在Windows中的C:\Users\<your_username>目录下创建一个.wslconfig文件,然后在文件中写入如下内容

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

然后用wsl –shutdown关闭WSL,之后再重启,问题就解决了

Welcome to my other publishing channels