From 1607c2e714582842741ba884e075e2497d08527b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E6=B5=B7?= Date: Wed, 21 Apr 2021 10:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8ipip.net=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A4=96=E7=BD=91=E5=87=BA=E5=8F=A3ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ardnspod | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ardnspod b/ardnspod index e4d3418..cace0f5 100644 --- a/ardnspod +++ b/ardnspod @@ -43,9 +43,9 @@ arWanIp4() { if [ -z "$hostIp" ]; then if type wget >/dev/null 2>&1; then - hostIp=$(wget -q -O- http://members.3322.org/dyndns/getip) + hostIp=$(wget -q -O- https://v4.myip.la) else - hostIp=$(curl -s http://members.3322.org/dyndns/getip) + hostIp=$(curl -s https://v4.myip.la) fi fi @@ -80,6 +80,14 @@ arWanIp6() { ;; esac + if [ -z "$hostIp" ]; then + if type wget >/dev/null 2>&1; then + hostIp=$(wget -q -O- https://v6.myip.la) + else + hostIp=$(curl -s https://v6.myip.la) + fi + fi + if [ -z "$hostIp" ]; then echo "arWanIp6 - Can't get ip address" return 1