Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

wsl2使用windows代理 #90

Open
swithun-liu opened this issue Jun 10, 2021 · 2 comments
Open

wsl2使用windows代理 #90

swithun-liu opened this issue Jun 10, 2021 · 2 comments

Comments

@swithun-liu
Copy link

我希望文档能够包括这一内容 / 我发现新的内容可以写入文档:

wsl2(预览版可以GUI)不能和wsl1一样共享ip,在windows上开了代理,在wsl中使用浏览器不能访问google,看了几个博客配置并未成功,希望有这部分的配置教程

@York618
Copy link

York618 commented Sep 11, 2021

直接wsl2里面安装ssr,v2
wsl2本质上是虚拟机

@kang8
Copy link

kang8 commented Sep 13, 2021

可以在 WSL2 终端尝试以下下面的命令:

$ curl -x "`cat /etc/resolv.conf | grep nameserver | awk '{print $2}'`:${your_proxy_http_port}" google.com

记得把 ${your_proxy_http_port} 替换成 Windows 上的 HTTP 代理端口。

不出意外的话,是可以访问 Google 的,也就是说在 WSL2 终端是可以使用 Windows 代理的。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants