用 ASUS Merlin 路由器 VPN 科学上网
- - GFW BLOG(功夫网与翻墙)作者:左耳朵 http://coolshell.cn 前言:这篇文章及其脚本可以写的更好,欢迎到https://github.com/haoel/haoel.github.io 更新. 作者:左耳朵 http://coolshell.cn. 来源: https://haoel.github.io/.
RT-AC68U_380.61_0.zip )http://192.168.1.1/ ,在 系统管理 -> 固件升级中上传固件文件(我上传的是: RT-AC68U_380.61_0.trx)系统管理 -> 系统设置 -> Persistent JFFS2 partitionFormat JFFS partition at next boot - 否Enable JFFS custom scripts and configs - 是系统管理 -> 系统设置 -> SSH DaemonAllow SSH password login - 是VPN -> PPTP/L2TP Client 中 添加设置文件。Active, 如果一切正确,可以看到连接成功。 ssh [email protected]
cd /jffs/scripts
wget https://haoel.github.io/downloads/route.sh
echo -e "#!/bin/sh\n\n/jffs/scripts/route.sh delete\n/jffs/scripts/route.sh add" > /jffs/scripts/wan-start
chmod a+rx /jffs/scripts/*
wan-start 是一个事件脚本,在wan口连上后会运行,这里的运行指令是,先删除路由,再加入(因为WAN口的IP可能会换了)route.sh (生成脚本 https://github.com/haoel/haoel.github.io/tree/master/scripts )route.sh add 来生效路由表,用 ./route.sh delete 来删除路由表。 cd /jffs/configs
wget https://haoel.github.io/downloads/dnsmasq.conf.add
server=itunes.apple.com/114.114.114.114 加到了 accelerated-domains.china.conf ,然后直接改名为 dnsmasq.conf.addlinkedin.com 使用到的 static.licdn.com 也在这个文件中,建议去掉,不然linkedin.com打开会因为找不到相应的资源文件而异常。114.114.114.114 作为国内的DNS解析服务。经网友指出这个不靠谱 http://bobao.360.cn/news/detail/1793.htmlnvram get wan0_dns 查看你自己的DNS,然后替换掉,如: sed -i "s/114.114.114.114/$(nvram get wan0_dns|awk '{print $1}')/" dnsmasq.conf.add
/jffs/scripts/route.sh add
service restart_dnsmasq
nslookup itunes.apple.com
ping www.google.com
traceroute weibo.com
chrome://flags/#enable-quic 可以关闭QUIC。