WSL使用系统代理

在终端输入cat /etc/resolv.conf, 看到我这里nameserver172.19.0.1.

而系统代理的端口是7890, 因此在终端输入:

1
export ALL_PROXY="http://172.19.0.1:7890"

这样就把代理配置好了, 来测试一下:

1
curl http://google.com

有返回值表明代理已生效.