zw963 / asuswrt-merlin-transparent-proxy

transparent proxy base on ss, v2ray, xray, ipset, iptables, chinadns on asuswrt merlin or side router.
MIT License
380 stars 80 forks source link

提供一个切换直连和代理的脚本 #31

Closed ohmyarch closed 7 years ago

ohmyarch commented 7 years ago

有些使用外网的场景需要直连,比如我想测一家vps商各节点的速度和延迟,部署透明代理之后都是走代理了,没法测。加白名单的话也是只用一次没什么必要,如果有个全局的开关就好了

zw963 commented 7 years ago

试试这个:

ssh admin@192.168.50.1 chmod -x /opt/etc/iptables.sh

然后重启路由器.

重新启用,

ssh admin@192.168.50.1 chmod +x /opt/etc/iptables.sh
ohmyarch commented 7 years ago

只能这样吗,不重启能不能实现

zw963 commented 7 years ago

试试:

ssh admin@192.168.50.1 sh /opt/etc/iptables_disable.sh

重新开启:

ssh admin@192.168.50.1 sh /opt/etc/iptables.sh

顺便报告下测试的效果, 例如, 当关闭后, 访问国内网站速度是否正常.

zw963 commented 7 years ago

加了 /opt/etc/iptables_toggle.sh. 37335cb

网络情况复杂, 不一定百分之百有效, 可以测试下。

zw963 commented 7 years ago

改名为 /opt/etc/toggle_proxy.sh.