一、设置 wslconfig
[wsl2]
networkingMode=mirrored
firewall=true
dnsTunneling=true
autoProxy=true
设置之后启动 WSL 报错: 不支持镜像网络模式,正在回退到 NAT 网络
二、设置 http_proxy
host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
export http_proxy='http://192.168.10.1:18888'
export https_proxy='http://192.168.10.1:18888'
设置之后执行 wget www.google.com, 一直在Connecting to 192.168.10.1:18888。
我代理软件开启了 “Allow LAN” 选项,防火墙设置了专业网络和公共网络都可通信。实在不知道还能怎么办了