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
|
||||
curl http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
else
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass'
|
||||
commit dhcp
|
||||
EOF
|
||||
hostip=$(dig +short A $HOST | tr -d "\n")
|
||||
ipset add ss_rules_dst_bypass $hostip
|
||||
curl --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
del_list dhcp.@dnsmasq[-1].ipset='/$HOST/ss_rules_dst_bypass'
|
||||
commit dhcp
|
||||
EOF
|
||||
ipset del ss_rules_dst_bypass $hostip
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue