mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Set a different ipset to bypass all and one to bypass only shadowsocks
This commit is contained in:
parent
97ff6a8bd5
commit
eedd893c9c
10 changed files with 38 additions and 26 deletions
|
@ -9,7 +9,7 @@ if [ -z "$INTERFACE" ]; then
|
|||
curl -4 http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
else
|
||||
hostip=$(dig +short A $HOST | tr -d "\n")
|
||||
ipset add ss_rules_dst_bypass $hostip
|
||||
ipset add ss_rules_dst_bypass_all $hostip
|
||||
curl -4 --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
ipset del ss_rules_dst_bypass $hostip
|
||||
ipset del ss_rules_dst_bypass_all $hostip
|
||||
fi
|
||||
|
|
|
@ -9,7 +9,7 @@ if [ -z "$INTERFACE" ]; then
|
|||
curl -6 http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
else
|
||||
hostip=$(dig +short A $HOST | tr -d "\n")
|
||||
ipset add ss_rules_dst_bypass $hostip
|
||||
ipset add ss_rules6_dst_bypass_all $hostip
|
||||
curl -6 --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
ipset del ss_rules_dst_bypass $hostip
|
||||
ipset del ss_rules6_dst_bypass_all $hostip
|
||||
fi
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
INTERFACE="$1"
|
||||
multipathip=$(dig +short A multipath-tcp.org | tr -d "\n")
|
||||
ipset add ss_rules_dst_bypass $multipathip > /dev/null 2>&1
|
||||
ipset add ss_rules_dst_bypass_all $multipathip > /dev/null 2>&1
|
||||
if [ -z "$INTERFACE" ]; then
|
||||
tracebox -v -n -p IP/TCP/MSS/MPCAPABLE/WSCALE multipath-tcp.org
|
||||
else
|
||||
tracebox -v -i $INTERFACE -n -p IP/TCP/MSS/MPCAPABLE/WSCALE multipath-tcp.org
|
||||
fi
|
||||
ipset del ss_rules_dst_bypass $multipathip > /dev/null 2>&1
|
||||
ipset del ss_rules_dst_bypass_all $multipathip > /dev/null 2>&1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
INTERFACE="$1"
|
||||
multipathip=$(dig +short A multipath-tcp.org | tr -d "\n")
|
||||
ipset add ss_rules_dst_bypass $multipathip > /dev/null 2>&1
|
||||
ipset add ss_rules_dst_bypass_all $multipathip > /dev/null 2>&1
|
||||
if [ -z "$INTERFACE" ]; then
|
||||
tracebox -v -j -m 10 -p IP/TCP/MSS/MPCAPABLE/WSCALE multipath-tcp.org
|
||||
else
|
||||
tracebox -v -j -m 10 -i $INTERFACE -p IP/TCP/MSS/MPCAPABLE/WSCALE multipath-tcp.org
|
||||
fi
|
||||
ipset del ss_rules_dst_bypass $multipathip > /dev/null 2>&1
|
||||
ipset del ss_rules_dst_bypass_all $multipathip > /dev/null 2>&1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue