uses dig myip.opendns.com instead of curl icanhazip.com for ipv4
This commit is contained in:
+3
-2
@@ -7,8 +7,9 @@ if [ -z "${ip_version:-}" ] || ([ "$ip_version" != 4 ] && [ "$ip_version" != 6 ]
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ip_version = 4 ]; then
|
if [ $ip_version = 4 ]; then
|
||||||
curl -4 http://icanhazip.com 2> /dev/null
|
dig +short myip.opendns.com @resolver1.opendns.com \
|
||||||
exit 0
|
&& exit 0 \
|
||||||
|
|| exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|||||||
Reference in New Issue
Block a user