1
0
mirror of https://github.com/EV21/dynb.git synced 2025-12-26 16:39:32 +01:00

feat: add support for ddnss.de as DynDNS2 provider

This commit is contained in:
2022-06-30 09:05:37 +02:00
parent d8a298f58a
commit 9d41354695

11
dynb.sh
View File

@@ -268,6 +268,7 @@ function select_update_base_url
DESEC_DYNDNS_UPDATE_URL="https://update.dedyn.io/?" DESEC_DYNDNS_UPDATE_URL="https://update.dedyn.io/?"
DUCKDNS_DYNDNS_UPDATE_URL="https://www.duckdns.org/update?domains=$DYNB_DYN_DOMAIN&token=$DYNB_TOKEN&" DUCKDNS_DYNDNS_UPDATE_URL="https://www.duckdns.org/update?domains=$DYNB_DYN_DOMAIN&token=$DYNB_TOKEN&"
DYNV6_DYNDNS_UPDATE_URL="https://dynv6.com/api/update?zone=$DYNB_DYN_DOMAIN&token=$DYNB_TOKEN&" DYNV6_DYNDNS_UPDATE_URL="https://dynv6.com/api/update?zone=$DYNB_DYN_DOMAIN&token=$DYNB_TOKEN&"
DDNSS_DYNDNS_UPDATE_URL="https://ddnss.de/upd.php?key=$DYNB_TOKEN&host=$DYNB_DYN_DOMAIN&"
case $DYNB_SERVICE_PROVIDER in case $DYNB_SERVICE_PROVIDER in
inwx* | INWX*) inwx* | INWX*)
@@ -286,6 +287,12 @@ function select_update_base_url
myip_str=ip myip_str=ip
myipv6_str=ipv6 myipv6_str=ipv6
;; ;;
ddnss*)
dyndns_update_url="${DDNSS_DYNDNS_UPDATE_URL}"
## we are currently not using the syntax with ip auto detection
myip_str=ip
myipv6_str=ip6
;;
*) *)
errorMessage "$DYNB_SERVICE_PROVIDER is not supported" errorMessage "$DYNB_SERVICE_PROVIDER is not supported"
exit 1 exit 1
@@ -313,7 +320,7 @@ function send_request
analyse_response analyse_response
return $? return $?
;; ;;
dynv6* | duckDNS* | duckdns*) dynv6* | duckDNS* | duckdns* | ddnss*)
_response=$( _response=$(
curl --silent "$_interface_str" \ curl --silent "$_interface_str" \
--user-agent "$_userAgent" \ --user-agent "$_userAgent" \
@@ -327,7 +334,7 @@ function send_request
function analyse_response function analyse_response
{ {
case $_response in case $_response in
good* | OK* | "addresses updated") good* | OK* | "addresses updated" | *Updated*hostname*)
if [[ $_response == "good 127.0.0.1" ]]; then if [[ $_response == "good 127.0.0.1" ]]; then
errorMessage "$_response: Request ignored." errorMessage "$_response: Request ignored."
return 1 return 1