wsl 设置主机代理

日常操作
Article Directory

wsl 设置主机代理

主机使用 v2rayN

1
2
3
4
5
6
7
8
9
10
11
12
13
# profile
# update hosts

export winip=$(ip route | grep default | awk '{print $3}')
export wslip=$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')

# set about proxy
proxy_host=$winip
export http_proxy="http://$proxy_host:10809"
export https_proxy="http://$proxy_host:10809"
export ftp_proxy="http://$proxy_host:10809"
export no_proxy="localhost,127.0.0.1"

Author: 哒琳

Permalink: http://blog.jieis.cn/2022/e2111c7e-f2bd-4cd9-8732-54ac40ba5aee.html

Comments