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:
parent
a8c6be62ff
commit
e9b7f7e40e
1 changed files with 3 additions and 8 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue