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

3 Commits

Author SHA1 Message Date
7d66155cc1 minor: 📝 update CHANGELOG 2023-02-26 18:00:39 +01:00
fdd4d03e74 fix: incorrect dns ip handling via domrobot 2023-02-26 17:57:42 +01:00
e743532664 minor: 📝 update README 2022-11-24 22:15:47 +01:00
3 changed files with 25 additions and 18 deletions

View File

@@ -1,6 +1,13 @@
# Changelog # Changelog
## 0.5.2 (2023-02-26)
### Fix
* Incorrect dns ip handling via domrobot. [Eduard Veit]
## 0.5.1 (2022-11-21) ## 0.5.1 (2022-11-21)
### Features ### Features

View File

@@ -24,15 +24,15 @@ IPv4 (A) and IPv6 (AAAA) record updates are supported.
The following update methods are currently implemented: The following update methods are currently implemented:
| Provider | API | TTL in seconds | Credentials | own domain via NS record | free (sub-) domain | | Provider | API | TTL in seconds | Credentials | own domain via NS record | free (sub-) domain |
|---------------------|-----------------------|----------------|----------------------------------------------------------------------------------------------|--------------------------|------------------------------------------------| |---------------------|-----------------------|----------------|----------------------------------------------------------------------------------------------|------------------------------------------|--------------------------------------|
| INWX.com | Domrobot JSON-RPC-API | 300 | customer login `username` & `password`. Mobile TAN (OTP) is currently not supported by DynB. | ✔️ | ⛔ choose one of your owned domains | | INWX.com | Domrobot JSON-RPC-API | 300 | customer login `username` & `password`. Mobile TAN (OTP) is currently not supported by DynB. | ✔️ 🆓 for your registered domains @ inwx | ⛔ for your registered domains @ inwx |
| INWX.com | DynDNS2 | 60 | specific dyndns `username` & `password` | ✔️ | ⛔ choose one of your owned domains per account | | INWX.com | DynDNS2 | 60 | specific dyndns `username` & `password` | ✔️ 🆓 for your registered domains @ inwx | ⛔ for your registered domains @ inwx |
| deSEC.io (dedyn.io) | DynDNS2 | 60 | `token` | ✔️ | ✔️ | | deSEC.io (dedyn.io) | DynDNS2 | 60 | `token` | ✔️ 🆓 | ✔️ |
| DuckDNS.org | DynDNS2 | 60 | `token` | ⛔ | ✔️ | | DuckDNS.org | DynDNS2 | 60 | `token` | ⛔ | ✔️ |
| dynv6.com | DynDNS2 | 60 | `token` | ✔️ | ✔️ | | dynv6.com | DynDNS2 | 60 | `token` | ✔️ 🆓 | ✔️ |
| ddnss.de | DynDNS2 | 10 | `update key` as `token` | ⛔ | ✔️ | | ddnss.de | DynDNS2 | 10 | `update key` as `token` | ⛔ | ✔️ |
| IPv64.net | DynDNS2 | 60 | `DynDNS Updatehash` as `token` | | ✔️ | | IPv64.net | DynDNS2 | 60 | `DynDNS Updatehash` as `token` | ✔️ 💲 | ✔️ |
| dynu.com | DynDNS2 | 30 | `username` & `password` | ✔️ | ✔️ | | dynu.com | DynDNS2 | 30 | `username` & `password` | ✔️ 🆓 | ✔️ |
## 📦 Requirements ## 📦 Requirements

16
dynb.sh
View File

@@ -130,7 +130,7 @@ function is_ip_address
result=$? result=$?
;; ;;
esac esac
return $result return "$result"
} }
function loopMode function loopMode
@@ -235,11 +235,11 @@ function do_dig_request
{ {
local dns_server=$1 local dns_server=$1
local record_type=$2 local record_type=$2
dig_response=$(dig @"$dns_server" in "$record_type" +short "$DYNB_DYN_DOMAIN") dig_response=$(dig @"$dns_server" in "$record_type" +short "$DYNB_DYN_DOMAIN" 2>&1)
dig_exitcode=$? dig_exitcode=$?
if [[ $dig_exitcode -gt 0 ]] if [[ $dig_exitcode -gt 0 ]]
then then
errorMessage "DNS request failed with exit code: $dig_exitcode $dig_response" errorMessage "DNS request for $record_type @ $dns_server failed with exit code: $dig_exitcode $dig_response"
unset _dns_ip unset _dns_ip
return 1 return 1
else else
@@ -271,8 +271,8 @@ function getDNSIP() {
local record_type=$1 local record_type=$1
if [[ $DYNB_UPDATE_METHOD == domrobot ]] if [[ $DYNB_UPDATE_METHOD == domrobot ]]
then then
echo "$_dns_records" | _dns_ip=$(echo "$_dns_records" |
jq --raw-output "select(.type == \"${record_type}\") | .content" jq --raw-output "select(.type == \"${record_type}\") | .content")
else else
for current_dns_server in "${provider_dns_servers[@]}" for current_dns_server in "${provider_dns_servers[@]}"
do do
@@ -322,7 +322,7 @@ function getRemoteIP
# shellcheck disable=2181 # shellcheck disable=2181
if [[ $curls_status_code -gt 0 ]] if [[ $curls_status_code -gt 0 ]]
then then
errorMessage "Remote IPv$ip_version request failed with ${current_check_server} curl status code: $curls_status_code" errorMessage "Remote IPv$ip_version request @ ${current_check_server} failed with curl status code: $curls_status_code"
_has_remote_ip_error=true _has_remote_ip_error=true
return_value=1 return_value=1
else else
@@ -354,7 +354,7 @@ function getRemoteIP
fi fi
;; ;;
esac esac
return $return_value return "$return_value"
} }
# requires parameter # requires parameter
@@ -1072,7 +1072,7 @@ function main
do do
doUpdates doUpdates
debugMessage "wait $DYNB_INTERVAL seconds until next check" debugMessage "wait $DYNB_INTERVAL seconds until next check"
sleep $DYNB_INTERVAL sleep "$DYNB_INTERVAL"
done done
else doUpdates else doUpdates
fi fi