mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Force ipv4 for omr-test-speed and add omt-test-speedv6 for ipv6
This commit is contained in:
parent
17dc28e63c
commit
ba819f9afe
2 changed files with 17 additions and 2 deletions
|
@ -6,10 +6,10 @@ HOST="proof.ovh.net"
|
|||
|
||||
trap : HUP INT TERM
|
||||
if [ -z "$INTERFACE" ]; then
|
||||
curl http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
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
|
||||
curl --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
curl -4 --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
ipset del ss_rules_dst_bypass $hostip
|
||||
fi
|
||||
|
|
15
openmptcprouter/files/bin/omr-test-speedv6
Executable file
15
openmptcprouter/files/bin/omr-test-speedv6
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||||
|
||||
INTERFACE="$1"
|
||||
HOST="proof.ovh.net"
|
||||
|
||||
trap : HUP INT TERM
|
||||
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
|
||||
curl -6 --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
|
||||
ipset del ss_rules_dst_bypass $hostip
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue