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

omr-test-speed can now work on server side

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-02-09 14:36:32 +01:00
parent 57fff1658e
commit 5ff2617fcb

View file

@ -28,11 +28,15 @@ if [ -z "$INTERFACE" ]; then
else else
domain=$(echo $HOST | awk -F/ '{print $3}') domain=$(echo $HOST | awk -F/ '{print $3}')
hostip=$(dig +nocmd +noall +answer A $domain | grep -v CNAME | awk '{print $5}' | tr '\n' ' ') hostip=$(dig +nocmd +noall +answer A $domain | grep -v CNAME | awk '{print $5}' | tr '\n' ' ')
for ip in $hostip; do if [ -n "$(ipset list 2>/dev/null | grep ss_rules)" ]; then
ipset add ss_rules_dst_bypass_all $ip for ip in $hostip; do
done ipset add ss_rules_dst_bypass_all $ip
done
fi
curl -4 --interface $INTERFACE $HOST >/dev/null || echo curl -4 --interface $INTERFACE $HOST >/dev/null || echo
for ip in $hostip; do if [ -n "$(ipset list 2>/dev/null | grep ss_rules)" ]; then
ipset del ss_rules_dst_bypass_all $ip for ip in $hostip; do
done ipset del ss_rules_dst_bypass_all $ip
done
fi
fi fi