1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00

Use ipset directly to bypass shadowsocks

This commit is contained in:
Ycarus 2018-07-25 10:49:02 +02:00
parent a8c6be62ff
commit e9b7f7e40e

View file

@ -8,13 +8,8 @@ trap : HUP INT TERM
if [ -z "$INTERFACE" ]; then if [ -z "$INTERFACE" ]; then
curl http://$HOST/files/10Gio.dat >/dev/null || echo curl http://$HOST/files/10Gio.dat >/dev/null || echo
else else
uci -q batch <<-EOF >/dev/null hostip=$(dig +short A $HOST | tr -d "\n")
add_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass' ipset add ss_rules_dst_bypass $hostip
commit dhcp
EOF
curl --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo curl --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
uci -q batch <<-EOF >/dev/null ipset del ss_rules_dst_bypass $hostip
del_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass'
commit dhcp
EOF
fi fi