美文网首页
wsl 检测到 localhost 代理配置,但未镜像到 WSL

wsl 检测到 localhost 代理配置,但未镜像到 WSL

作者: 博楠同学 | 来源:发表于2023-11-29 17:56 被阅读0次

在 windows用户目录下新建.wslconfig, 举例C:\Users\Administrator.wslconfig
新增下面的内容保存

[wsl2]  
localhostForwarding=true  
networkingMode=mirrored 

重启 wsl --shutdown

遇到过一些问题,wsl重启不管用

最终大招,重启windows

FAQ
1、这个时候可能你访问内网的域名就会失败,报错Name or service not known

sudo vim /etc/resolv.conf

在这里面添加一个nameserver 是公司的dns地址,

如果不知道的话,那就一个一个添加hosts

相关文章

网友评论

      本文标题:wsl 检测到 localhost 代理配置,但未镜像到 WSL

      本文链接:https://www.haomeiwen.com/subject/lpefgdtx.html