dns-scripts: add DNS lookup support for "drill" and "khost" (Knot DNS) 2667/head
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>
Sun, 8 May 2016 11:14:45 +0000 (13:14 +0200)
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>
Sun, 8 May 2016 11:14:45 +0000 (13:14 +0200)
- add DNS lookup support for "drill" and "khost" (Knot DNS) #2637
- new service nsupdate.info (IPv4 and IPv6) #2433
- new services dyndnss.net, dyns.net (IPv4 only)
- new services dnshome.de, goip.de, myonlineportal.net (IPv4 and IPv6)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/services
net/ddns-scripts/files/services_ipv6

index 72850c623061e3c4fea28f9a308ff9c368f0c6bb..3724d36d5ef295042ff0d9023c203f3f705bb195 100755 (executable)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ddns-scripts
 # Version == major.minor.patch
 # increase on new functionality (minor) or patches (patch)
-PKG_VERSION:=2.6.4
+PKG_VERSION:=2.7.1
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
index 525719b59328e9157711d6ede207a4fef4553a69..72deca0bf475c51530dd74ba3d92bc827913f246 100755 (executable)
@@ -971,6 +971,28 @@ get_registered_ip() {
 
                __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE"
                __PROG="BIND host"
+       elif [ -n "$(which khost)" ]; then
+               __PROG="$(which khost)"
+               [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -t A"  || __PROG="$__PROG -t AAAA"
+               if [ $force_ipversion -eq 1 ]; then                     # force IP version
+                       [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4"  || __PROG="$__PROG -6"
+               fi
+               [ $force_dnstcp -eq 1 ] && __PROG="$__PROG -T"  # force TCP
+
+               __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE"
+               __PROG="Knot host"
+       elif [ -n "$(which drill)" ]; then
+               __PROG="$(which drill) -V0"                     # drill options name @server type
+               if [ $force_ipversion -eq 1 ]; then                     # force IP version
+                       [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4"  || __PROG="$__PROG -6"
+               fi
+               [ $force_dnstcp -eq 1 ] && __PROG="$__PROG -t" || __PROG="$__PROG -u"   # force TCP
+               __PROG="$__PROG $lookup_host"
+               [ -n "$dns_server" ] && __PROG="$__PROG @$dns_server"
+               [ $use_ipv6 -eq 0 ] && __PROG="$__PROG A"  || __PROG="$__PROG AAAA"
+
+               __RUNPROG="$__PROG >$DATFILE 2>$ERRFILE"
+               __PROG="drill"
        elif [ -n "$(which hostip)" ]; then     # hostip package installed
                __PROG="$(which hostip)"
                [ $force_dnstcp -ne 0 ] && \
@@ -1017,6 +1039,10 @@ get_registered_ip() {
                else
                        if [ "$__PROG" = "BIND host" ]; then
                                __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
+                       elif [ "$__PROG" = "Knot host" ]; then
+                               __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' )
+                       elif [ "$__PROG" = "drill" ]; then
+                               __DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' )
                        elif [ "$__PROG" = "hostip" ]; then
                                __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX")
                        else
index 8ddfe273afb4ec83742c19241ea9070b70625be3..06307d579e89314e542e42f85d1b0aa0dec255ef 100644 (file)
@@ -33,7 +33,7 @@
 #
 # 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
 
-"dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+"dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
 "changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"
 "zoneedit.com"         "http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]"
 "free.editdns.net"     "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
@@ -49,7 +49,7 @@
 "he.net"       "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
 # DNSdynamic.org
-"dnsdynamic.org"       "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]"
+"dnsdynamic.org"       "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
 # dnsExit.com free dynamic DNS update url
 "dnsexit.com"  "http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]"
 
 # regfish.de
 "regfish.de"   "http://dyndns.regfish.de/?fqdn=[DOMAIN]&forcehost=1&authtype=secure&token=[PASSWORD]&ipv4=[IP]"        "success|100|101"
+
+# nsupdate.info - a free service - supports https
+"nsupdate.info"        "http://[USERNAME]:[PASSWORD]@ipv4.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
+
+# dyndnss.net
+"dyndnss.net"  "http://www.dyndnss.net/?user=[USERNAME]&pass=[PASSWORD]&domain=[DOMAIN]&updater=other"
+
+# goip.de
+"https://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip6=[IP]"
+
+# myonlineportal.net
+"myonlineportal.net"   "http://[USERNAME]:[PASSWORD]@myonlineportal.net/updateddns?hostname=[DOMAIN]&ip=[IP]"  "good|nochg"
+
+# dyns.net
+"dyns.net"     "http://www.dyns.net/postscript011.php?username=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&ip=[IP]"   "200"
+
+# dnshome.de
+"dnshome.de"   ""https://[USERNAME]:[PASSWORD]@www.dnshome.de/dyndns.php?hostname=[DOMAIN]&ip=[IP]"
+
index 61c0d2022fa3b12123551470bcb5e8dd2c812954..64957bf847a779b6d37d404c943ab5c7cd454ac2 100644 (file)
@@ -55,7 +55,7 @@
 "variomedia.de"                "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]"      "good|nochg"
 
 # IPv6 @ Dyn.com
-"dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
+"dyndns.org"           "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
 
 # duckdns.org
 "duckdns.org"  "http://www.duckdns.org/update?domains=[DOMAIN]&token=[PASSWORD]&ipv6=[IP]"     "OK"
 
 # Mythic Beasts (https://www.mythic-beasts.com) Dynamic DNS
 "mythic-beasts.com"    "http://dnsapi6.mythic-beasts.com/?domain=[USERNAME]&password=[PASSWORD]&command=REPLACE%20[DOMAIN]%2060%20AAAA%20DYNAMIC_IP&origin=."
+
+# nsupdate.info - a free service - supports https
+"nsupdate.info"        "http://[USERNAME]:[PASSWORD]@ipv6.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]"        "good|nochg"
+
+# goip.de
+"https://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip6=[IP]"
+
+# myonlineportal.net
+"myonlineportal.net"   "http://[USERNAME]:[PASSWORD]@myonlineportal.net/updateddns?hostname=[DOMAIN]&ip6=[IP]" "good|nochg"
+
+# dnshome.de
+"dnshome.de"   ""https://[USERNAME]:[PASSWORD]@www.dnshome.de/dyndns.php?hostname=[DOMAIN]&ip6=[IP]"
+