mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 11:01:50 +00:00
8 lines
No EOL
358 B
Bash
Executable file
8 lines
No EOL
358 B
Bash
Executable file
#!/bin/sh
|
|
checkip=$(dig +short A ip.openmptcprouter.com | tr -d "\n")
|
|
ipset add ss_rules_dst_bypass_all $checkip > /dev/null 2>&1
|
|
ip="$(curl -s -4 -m 3 --interface $1 http://ip.openmptcprouter.com)"
|
|
ipset del ss_rules_dst_bypass_all $checkip > /dev/null 2>&1
|
|
if expr "$ip" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; then
|
|
echo $ip
|
|
fi |