控制台翻墙

windows通过clash,实现局域网内多设备翻墙

  1. clash打开允许局域网,端口号后面要用

    image-20240918161214923

  2. clash或者ifconfig查看windowsIP

  3. 输入命令

export http_proxy=本机ipv4地址:clash端口

​ 如果是https用(比如github)两个都要export

export https_proxy=本机ipv4地址:clash端口

​ eg:

1
2
3
export http_proxy=10.255.17.48:7890

export https_proxy=10.255.17.48:7890

添加aliass,快速开启关闭

1
2
3
4
5
6
7
8
9
10
11
12
#vpn
export PROXY_IP="192.168.142.238:7890"
alias VpnOn='export http_proxy=$PROXY_IP; export https_proxy=$PROXY_IP'
unsetspecificproxy() {
if [ "$http_proxy" = "$PROXY_IP" ]; then
unset http_proxy
fi
if [ "$https_proxy" = "$PROXY_IP" ]; then
unset https_proxy
fi
}
alias VpnOff='unsetspecificproxy'