Total Pageviews

Sunday, 25 August 2019

利用全局代理程序-notbevpn翻墙 (已不再好用)

在本地机器mac上。
git clone https://github.com/cachefiles/notbevpn
cd notbevpn
make
(在当前目录下,会生成可执行文件 toyclient)
nano ifup-utun1-new.sh
其内容如下:
#!/bin/bash
tun_dev=utun1
ifconfig ${tun_dev} 10.3.0.1/24 10.3.0.15 up
route add default -ifscope ${tun_dev} 10.3.0.15
echo ip route add default dev ${tun_dev}

route add -net default -interface ${tun_dev}

然后运行:
sudo ./toyclient -s ./ifup-utun1-new.sh -t utun1 -p tcp -i 10.3.0.15 10.3.0.1:8000
可把此命令的内容保存为start-notbevpn.sh ,
chmod 755 start-notbevpn.sh
以后要翻墙时,运行./start-notbevpn.sh
如果遇到Resource busy的提示,则运行sudo killall toyclient ,然后再运行./start-notbevpn.sh


在本地机器mac上,运行:brew install shadowsocks-libev ,然后运行:
ss-local -l 8000 -b 10.3.0.1 -s your-shadowsocks-server-ip -p the_port -m the_method -k the_key

sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1

cd ~/goproxy-by-snail007 && sudo ./proxy dns -S socks -T tcp -P 127.0.0.1:1080 -p :53
(你的mac机器上,需开着‘纸飞机’. 上述dns proxy的用法见此文:
https://briteming.blogspot.com/2019/08/socks-proxydnsdns-proxy-by-snail007.html)

这样,你的整个mac机器就处于翻墙状态了。

如果你第二天早上起来,运行:
cd ~/notbevpn
sudo ./toyclient -s ./ifup-utun1-new.sh -t utun1 -p tcp -i 10.3.0.15 10.3.0.1:8000
显示:
add net default: gateway 10.3.0.15
ip route add default dev utun1
route: writing to routing socket: File exists
add net default: gateway utun1: File exists
导致无法翻墙成功。
解决办法:
sudo route delete default && sudo echo ip route delete default dev ${tun_dev} && sudo route add vps-ip 192.168.1.1

然后再运行上面的各步骤即可:
cd ~/notbevpn && ./start-notbevpn.sh

ss-local -l 8000 -b 10.3.0.1 -s your-shadowsocks-server-ip -p the_port -m the_method -k the_key

sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1

cd ~/goproxy-by-snail007 && sudo ./proxy dns -S socks -T tcp -P 127.0.0.1:1080 -p :53


项目地址:https://github.com/cachefiles/notbevpn
https://github.com/cachefiles/notbevpn/wiki/%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95
(https://github.com/pagxir/toy2vpn)

类似的全局代理程序-snet:

利用全局(指整台机器的)代理-SNET翻墙


唉,又要感叹一句,中国人真是聪明,共匪真tmd邪恶,共匪早点去死吧。。。
-------------

nano ifup-utun10.sh
其内容如下:

#!/bin/bash

ifconfig utun10 10.9.0.1 netmask 255.255.255.0 10.9.0.1 up

route delete default 

route add default 10.9.0.1

route add vps-public-ip 192.168.1.1


然后运行:

sudo ./toyclient -s ./ifup-utun10.sh -t utun10 -p tcp -i 10.9.0.1 10.9.0.2:10086

No comments:

Post a Comment