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

今天安装在windows上面安装wsl的时候出现下面这个问题:

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

解决方法

在你的windows的C:\Users\目录下面创建一个.wslconfig文件夹,往里面写入下面代码

[experimental]
autoMemoryReclaim=gradual  
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true

然后关闭wsl

wsl --shutdown

然后重启wsl

你可能感兴趣的:(linux)