请教一个 WSL2 上代理的问题
source link: https://www.v2ex.com/t/809967
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
因为 windows 分配给 wsl2 的 IP 是动态变化的,所以我在.bashrc 设置了如下环境变量,我想用curl cip.cc
检测终端是不走代理,但返回的是国内当地的 ip 地址
export host_ip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export https_proxy="http://${host_ip}:7890"
export http_proxy="http://${host_ip}:7890"
export all_proxy="http://${host_ip}:7890"
所以请教下大家,终端走代理的正确姿势该怎么操作呢?
第 1 条附言 · 3 小时 31 分钟前
Recommend
-
6
Windows 10 连接不上 WSL2 内服务的问题March 24, 2021这个问题在 Build 20180 及以上的系统内已经被修复了。可惜,截至这篇文章完成时我还在 19042。 起因就是,我不想安装 MySQL for Windows。因为 locale 为...
-
9
V2EX › NGINX 请教一个 nginx 反向代理 sub_filter 正则替换字符串的问题。 JustinMsc · 11...
-
10
V2EX › 程序员 请教通过 HTTP 代理访问配置有 Cloudflare CDN 的网站 gxever · 20 小时 5...
-
0
V2EX › Linux 请教下代理网关的知识 violence123456 · 1 小时 12 分钟前 via iPhone ·...
-
5
MrLeiDeSen's Blog WSL2 配置代理2022-02-07 17:33:30 · MrLeiDeSen准备#C...
-
2
wsl2使用宿主主机代理 作者: dreamfly 分类: linux 发布时间: 2022-05-05 15:28 在使用wsl2的时候,有些时候我们希望可以使用主机的代理来访问某些40...
-
5
WSL2 因为是通过虚拟机的方式实现,网络不再像 WSL1 一样与 Windows 共享,变成了一个新的网段,所以想使用宿主机的代理就比较麻烦了 WSL 中获取宿主机 IP WSL 每次启动的时候都会有不同的 IP 地...
-
3
V2EX › NGINX 有对 nginx 熟悉的老哥吗?请教一下 nginx 代理 tcp 的一个问题?
-
2
解决Windows端口莫名其妙被WSL2占用的问题 作者: LiesAuer...
-
5
wsl2 内存问题 V2EX › Windows wsl2 内存问题
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK