From 6c127461b57291eb0277acd26f44674a64798a1d Mon Sep 17 00:00:00 2001 From: rehiy Date: Thu, 25 Nov 2021 13:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=85=88=E9=80=89=E6=8B=A9=E5=89=A9?= =?UTF-8?q?=E4=BD=99=E6=97=B6=E9=97=B4=E6=9C=80=E9=95=BF=E7=9A=84ipv6?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/rehiy/dnspod-shell/pull/90/files --- ardnspod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ardnspod b/ardnspod index 2ae1ca8..4269464 100644 --- a/ardnspod +++ b/ardnspod @@ -73,7 +73,7 @@ arWanIp6() { case $(uname) in 'Linux') - hostIp=$(ip -o -6 addr list | grep -Ev '\s(docker|lo)' | awk '{print $4}' | cut -d/ -f1 | grep -Ev "$lanIps" | tail -n 1) + hostIp=$(ip -o -6 addr list | grep -Ev '\s(docker|lo)' |awk '{print $4,substr($NF,0,length($NF)-3)}'|sed 's/fore/2592000/g'|sort -k 2 -n | cut -d/ -f1 | grep -Ev "$lanIps" | tail -n 1) ;; 'Darwin') hostIp=$(ifconfig | grep "inet6 " | awk '{print $2}' | grep -Ev "$lanIps" | tail -n 1)