From b1d630d713098e2d3f0b65aa25e1a6be8da5cb14 Mon Sep 17 00:00:00 2001 From: Nazar78 Date: Tue, 20 Dec 2022 01:38:22 +0800 Subject: [PATCH] Added IPv6 Update IPv6 if it's enabled. --- ASUSddns.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ASUSddns.sh b/ASUSddns.sh index 2e43cfe..8944ea2 100755 --- a/ASUSddns.sh +++ b/ASUSddns.sh @@ -10,7 +10,13 @@ asus_request(){ ;; esac local password=$(calculate_password) - echo $(curl --write-out %{http_code} --silent --output /dev/null --user-agent "ez-update-3.0.11b5 unknown [] (by Angus Mackay)" --basic --user $user:$password "http://ns1.asuscomm.com/$path?hostname=$host&myip=$wanIP") + if [ "$(nvram get ipv6_service)" != "disabled" ]; then + wanIPv6=$(nvram get ipv6_rtr_addr) + if [ "$wanIPv6" != "" ];then + wanIPv6="&myipv6=$wanIPv6" + fi + fi + echo $(curl --write-out %{http_code} --silent --output /dev/null --user-agent "ez-update-3.0.11b5 unknown [] (by Angus Mackay)" --basic --user $user:$password "http://ns1.asuscomm.com/$path?hostname=$host&myip=$wanIP$wanIPv6") } calculate_password(){