334 Commits

Author SHA1 Message Date
Tim Flubshi
10b8f04e3e ddns-scripts: add netcup.com support
Add a new netcup DDNS provider using the netcup DNS api
(ccp.netcup.net) with API key authentication.

Configuration mapping:
* username  = netcup customer number
* password  = netcup API password
* param_enc = netcup API key (generated in the CCP)
* domain    = fully qualified subdomain to update  (e.g. home.example.de)
* param_opt = (optional) root/zone domain override (e.g. example.de)
              When omitted the root domain is derived by stripping the
              leftmost label from 'domain'. This only works correctly for
              a single subdomain level (e.g. "home.example.de").
              param_opt MUST be set explicitly in two cases:
              1. Deep subdomains: domain=test.internal.example.org
              2. ccSLD apex domains: domain=example.co.nz

Signed-off-by: Tim Flubshi <flubshi@gmail.com>
2026-03-25 07:31:57 +01:00
Florian Eckert
b1502c453e ddns-scripts: switch to procd handling
The 'ddns-scripts' packages still uses not the procd service handling.
This commit changes this.

This change also resolves the issue where, if a UCI configuration is
already present, the process is blocked during installation via APK and
does not complete.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2026-03-20 07:30:39 +01:00
Patrick Hemmen
3dd1f337eb ddns-scripts: change servercow.de to new dns api
The previous way to update dns records at servercow.de was replaced
with a https based dns api. The new dns api is documented at
https://wiki.servercow.de/de/domains/dns_api/api-syntax/#einfuhrung

Signed-off-by: Patrick Hemmen <jummo4@yahoo.de>
2026-03-02 13:45:34 +01:00
bdk38
f901d88ea4 ddns-scripts: add API-based registered IP verification for Cloudflare proxied
records

Problem:
When using Cloudflare with proxy enabled (orange cloud), DNS lookups
return Cloudflare's edge IP instead of the actual origin IP registered
in the dashboard. This causes ddns-scripts to incorrectly detect IP
mismatches, triggering unnecessary updates and potential rate limiting.

Solution:
Add an optional 'use_api_check' configuration option that enables
provider scripts to fetch the registered IP directly via their API,
bypassing DNS lookups.

Changes:
- dynamic_dns_functions.sh: Add API check block to get_registered_ip()
  (~25 lines). When use_api_check is enabled, sources the provider
  script with GET_REGISTERED_IP=1 flag. Falls back to DNS lookup if
  API check is disabled, unsupported, or fails.

- update_cloudflare_com_v4.sh: Add handler for GET_REGISTERED_IP mode
  (~15 lines). Reuses existing cURL setup and authentication to query
  Cloudflare API for actual record content.

- etc/config/ddns: Document use_api_check option

Behavior:
- use_api_check=0 or unset: DNS lookup (existing behavior, no changes)
- use_api_check=1 with API support: API query for registered IP
- use_api_check=1 without API support: Falls back to DNS lookup
- API failure: Gracefully falls back to DNS lookup

Testing:
- Cloudflare (proxied): Correctly retrieves origin IP via API
- Cloudflare (non-proxied): Works correctly
- No-IP: DNS lookup works (no regression)
- IPv4 and IPv6 records tested
- API failure gracefully falls back to DNS

Signed-off-by: Wayne King 244781262+bdk38@users.noreply.github.com
2026-02-16 15:27:09 +01:00
Lin Fan
8ce03e3065 ddns-script: update namesilo.com
switch xml parser to xmllint because xmlstarlet is not available

Signed-off-by: Lin Fan <im.linfan@gmail.com>
2026-02-10 09:00:22 +01:00
Florian Eckert
34d0684be1 ddns-scripts: remove postinst and prerm script call
For reasons that have not been investigated in detail, the package blocks
during 'postinst' with the new 'apk' backend when the package is installed
on the target.

After much back and forth, it turned out that the '/etc/init.d/ddns start'
command is responsible for this. The call is blocking.

The command '/etc/init.d/ddns enabled' in the 'postinst' also makes no sense
here, as it only checks whether the ddns service is enabled. The return value
is not checked at all. And the 'prerm' script is also not needed, as the
calls made there are implicitly called during package deinstallation.

Therefore, this commit removes the entire and not needed 'postinst' and
'prerm' script call.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-02-09 14:29:09 +01:00
Florian Eckert
2b6adb9ae7 ddns-scripts: Fix hetzner install target file name
This was overlooked. Therefore, the package could not be built.

Fixes: e9fe0249f6 ("ddns-scripts: Fix Hetzner Cloud naming")
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-02-06 10:57:44 +01:00
Christopher Obbard
081b7043c3 ddns-scripts: Fix Hetzner Cloud naming
In the original commit I used the wrong name for the package in the
Makefile and various other files which caused the package to not build.

Unify the naming to "cloud" to fix the package build.

Fixes: 5ee205bd31 ("ddns-scripts: add Hetzner Cloud support")
Signed-off-by: Christopher Obbard <obbardc@gmail.com>
2026-02-03 15:30:05 +01:00
Christopher Obbard
5ee205bd31 ddns-scripts: add Hetzner Cloud support
Add a new Hetzner DDNS provider using the Hetzner Cloud API
(api.hetzner.cloud) with Bearer token authentication.

Configuration guide:
* set [domain] to domain
* set [username] to subdomain (without domain)
* set [password] to Bearer API key

Signed-off-by: Christopher Obbard <obbardc@gmail.com>
2026-02-03 08:32:33 +01:00
Lin Fan
1199a40351 ddns-scripts: add namesilo.com
new service provider namesilo.com

config guide:
* set [domain] to apex domain
* set [username] to subdomain (without apex domain)
* set [password] to api key

Signed-off-by: Lin Fan <im.linfan@gmail.com>
2026-01-29 08:31:08 +01:00
Juan Antonio
afd01e3034 ddns-scripts: fix luci XHR timeout when restarting ddns service
Redirect stdout and stderr to /dev/null when starting/restarting the ddns
service in the background. Without this redirection, file descriptors are
inherited by the child process, preventing proper process detachment and
causing luci's XHR requests to timeout.
2026-01-21 08:00:39 +01:00
monokoo
ae659deb40 ddns-scripts: add multiple DNS records support for aliyun ddns
Added logic to extract and match DNS record ID from parameters,
with fallback to default selection if no match is found.

Signed-off-by: QiLei Niu <qilei.niu@gmail.com>
2026-01-18 17:11:00 +01:00
Andrea Ferro
3a4b906a36 ddns-scripts: add apertodns.com-token to provider list
Add missing provider entry for apertodns.com-token.
The service configuration (apertodns.com-token.json) was already
merged in PR #28160, but the provider list entry was missing.

Signed-off-by: Andrea Ferro <support@apertodns.com>
2026-01-13 11:46:44 +01:00
Andrea Ferro
bbed74c782 ddns-scripts: add apertodns.com to provider list 2026-01-12 11:32:11 +01:00
Andrea Ferro
6265fab8ce ddns-scripts: add ApertoDNS DDNS provider
Add support for ApertoDNS dynamic DNS service with two configuration
options:
- apertodns.com: Standard DynDNS2 compatible authentication (user/pass)
- apertodns.com-token: Token-based authentication for DDNS clients

Both configurations support IPv4 and IPv6 updates via the standard
/nic/update endpoint.

Signed-off-by: Andrea Ferro <support@apertodns.com>
2026-01-12 11:32:11 +01:00
Daniel F. Dickinson
01ac2966f7 ddns-scripts: remove rework of OVH provider
This rework was unneeded, rather the fix in
https://github.com/openwrt/packages/pull/28174 is required to resolve
missing HTTP_AUTH support.

The original issue in https://github.com/openwrt/packages/issues/27526
(unable to update OVH DynHost IP address) was wrongly attributed to a
change on the OVH API. As discussed in
https://github.com/openwrt/packages/issues/28172 the API continues to
work for 24.10.5 system, as well as users using wget-ssl.

The changes in https://github.com/openwrt/packages/pull/27561 and
the followup fix https://github.com/openwrt/packages/pull/27694 add
unnecessary dependencies which are heavier than the actually needed
minimum.

Therefore return the OVH provider to the previous state, and let
https://github.com/openwrt/packages/pull/28174 resolved the issue.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-01-07 10:15:39 +01:00
George Sapkin
de64f871b0 treewide: fix spelling and grammar in Makefiles
Fix spelling and grammar in package definitions, configs, comments and
other strings.

Signed-off-by: George Sapkin <george@sapk.in>
2025-12-31 09:12:36 +02:00
Vladimir Tkachev
a13c76304e ddns-scripts: add beget.com api support
The Beget API provider was implemented according to https://beget.com/en/kb/api/dns-administration-functions

Signed-off-by: Vladimir Tkachev <awesome149712@gmail.com>
2025-12-25 18:46:00 +01:00
Brian J. Murrell
63308ab213 ddns-scripts: remove minimum 5 minute wait
To check if the update was successful.

Not all DDNS implementations have such huge latencies updating their services.

nsupdate for example, updates immediately and the update is immediately checkable.

Add new check_interval_min value to be able to set a check interval lower than the
previously hard-coded 5 minutes.

Fixes: #20564

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
2025-12-17 15:33:59 +01:00
Karol Babioch
11f7c36d68 ddns-scripts: Use parameter-based authentication for he.net
According to [1] Basic Auth seems to be broken since a while for he.net.
The documentation [2] is outdated, and still mentions Basic Auth, but
switching to parameter-based authentication seems to fix the issue.

It also bumps PKG_RELEASE in order to ensure a new version is packaged.

[1]: https://github.com/openwrt/packages/issues/27593
[2]: https://dns.he.net/docs.html

Signed-off-by: Karol Babioch <karol@babioch.de>
2025-11-25 07:43:36 +01:00
Fabian Zimmermann
0201efd635 ddns-script: removes linefeed which causes 401 err
The linefeed at the end causes ovh-api to return 401 even if the
password is correct.

Fixes #27693

Signed-off-by: Fabian Zimmermann <dev.faz@gmail.com>
2025-10-24 09:13:50 +02:00
David Andreoletti
104aabdd5b ddns-scripts: fixed ovh dns record update
OVH changed its API to update DNS records. It now requires HTTP Basic
Authorization header. As such the default ddns-script method to update
the DNS record is failing. The fix is to move DNS record updates into
its own script/package.

Signed-off-by: David Andreoletti <david@andreoletti.net>
2025-10-07 16:32:37 +02:00
Dominic Greenberg
00310cf88b ddns-scripts-cloudflare: document API Token auth in comments
adjust comments documenting the already supported API Token auth
adjust comments with URLs that changed in the meantime
adjust comment regarding CF API documentation URL, points to the scripts relevant DNS section

Signed-off-by: Dominic Greenberg <daroel@riseup.net>
2025-10-06 08:08:38 +02:00
Florian Eckert
5a688059e9 Revert "afraid.org-v2-token.json: Fix 404 on update"
This reverts commit 366629b117.

It has been determined that the URL currently in use points to v1. The
previously used URL remains valid and is correct. If someone requires the
v1 URL, a new provider must be created.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-09-23 09:54:43 +02:00
Paul Donald
1463d79bdf ddns-scripts: stash the next check time
Calculating the next check time based on the last update time is not
very accurate if the next check is a large multiple forwards from the
last update time because the cumulative sleeps and wake times are not
exact but best effort of the OS. Other factors including clock-drift
give rise to a larger time discrepancy the further the next update is in
the future.

Stash the next check time which should be quite accurate since it's
only one sleep instance away. This is also for use in the GUI.

Tested on 24.10.2

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-09-23 09:12:10 +02:00
Qian Suyao
65a9d7d450 ddns-scripts: fix getting IP address via web in get_current_ip()
Add back the regex searching for valid IP address when getting IP
address via web.

Fixes: 9cdd1a1660 ("ddns-scripts: refactor get_current_ip()")
Signed-off-by: Qian Suyao <qiansuyao@gmail.com>
2025-08-05 08:37:41 +02:00
Alejandro Ojeda Gutiérrez
e1d6d65f30 ddns-scripts: add dondominio.com
Adds support for dondominio.com to the ddns-scripts package.
https://dondominio.dev/en/dondns/docs/api/#usage

Signed-off-by: Alejandro Ojeda Gutiérrez <alejandro@localnet.org.es>
2025-07-25 08:16:35 +02:00
Paulo Neves
366629b117 afraid.org-v2-token.json: Fix 404 on update
The URL for update changed and updates were silently failing
with HTTP 404. Fixed the URL

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
2025-07-10 13:23:58 +02:00
Eric Leung
dadafe3ac9 ddns-scripts: (cloudflare) add support for custom zone ID and DNS record ID
User can (optionally) set zone_id and dns_record_id in param_opt.
This allows round robin DNS setup in Cloudflare.

Signed-off-by: Eric Leung <contact@ericleung.dev>
2025-07-09 09:48:00 +02:00
Shin Rag
e9c1321e8b ddns-scripts: add aliyun.com
Adds support for aliyun.com to the ddns-scripts package.

Signed-off-by: Shin Rag <zhdlcc@gmail.com>
2025-06-26 10:57:42 +02:00
Paul Donald
3f7daf5661 ddns-scripts: bump package release
nothing to say about this

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Paul Donald
88dc8e8b88 ddns-scripts: refactor verify_proxy()
no calls to external utilities - use variable substitution.
no regex.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Paul Donald
38e02fbd57 ddns-scripts: drop split_FQDN()
The function is unused - it can be removed.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Paul Donald
9cdd1a1660 ddns-scripts: refactor get_current_ip()
Remove the awk based ifconfig output handling violence (omg) and instead
use the ip utility and its JSON output: this uses the available
system utility jsonfilter. Much cleaner and less brittle.

This fixes alias interface handling
Fixes issue #24922

Add dep 'ip' (iproute2: ip-tiny, ip-full)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Paul Donald
727cdeff68 ddns-scripts: refactor verify_dns()
quote variables
coalesce error conditions
code reads more cleanly and less 'stabby'.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Paul Donald
b953ed23f7 ddns-scripts: refactor verify_host_port()
Leverage the resolveip utility - it does the same job that several
different resolvers do for a fraction of the resource usage. This...
to verify a host's connectivity.

resolveip dependency net delta: +2-3Kbytes

Also uses the ddns-scripts built-in 'timeout' function.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-25 15:40:21 +02:00
Liangbin Lian
150d88585b ddns-scripts: fix parsing of parameters for cloudflare.com
Compatible with domain without the `@` symbol, consistent with the previous.

Fixes 8c55d089 ("ddns-scripts: fix parsing of parameters for cloudflare.com")

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2025-06-04 13:54:01 +02:00
Liangbin Lian
8c55d089cd ddns-scripts: fix parsing of parameters for cloudflare.com
There is an obvious bug here:
if we want to update example.com.example.com in zone example.com,
so `domain=example.com@example.com`, after parsing,
the `__HOST` will be `example.com`, not expected `example.com.example.com`.

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2025-05-27 08:05:06 +02:00
Rikki Vizcarra
1de23c1c12 ddns-script: Change CURL call and redirect output in update_porkbun_v3
This also fixes: https://github.com/openwrt/packages/issues/26181

CURL funciton change was patterned on other ddns update scripts
that uses also JSON request/response payloads similar to
update_digitalocean_v2.sh: 15014f93e1/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh (L29)
update_gcp_v1.sh: 15014f93e1/net/ddns-scripts/files/usr/lib/ddns/update_gcp_v1.sh (L212)

rebased and bumbped ddns-script version

Signed-off-by: Rikki Vizcarra <rikki.vizcarra@gmail.com>
2025-04-20 22:10:44 +02:00
Paul Donald
bed8c8ae33 ddns-scripts: bump package release
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-18 18:06:14 +02:00
Paul Donald
9f3d6fed24 ddns-scripts: fix daemon to reload instead of kill
Instead of just killing all the processes, let's actually reload them,
since that's what the user would expect when issuing a 'reload' command.

Move the killall portion to a kill function

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-18 18:06:14 +02:00
Paul Donald
081f1856a5 ddns-scripts: fix daemon start - background the script
omitted the ampersand in the re-factor in commit
a361672882

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-18 18:06:14 +02:00
Paul Donald
15014f93e1 ddns-scripts: correct bump release
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-11 08:37:57 +02:00
Paul Donald
32de15820b ddns-scripts: bump PKG_RELEASE
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
5b277eb855 ddns-scripts: refactor get_uptime() and avoid cat in sub-shell
no sub-shell is spawned to get uptime.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
2bf1916a34 ddns-scripts: refactor load_all_config_options()
Same functionality - code reads less 'shouty' and 'stabby'.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
77933a45ea ddns-scripts: add stop action for individual sections
it is now possible to stop an individual instance, and not all of them.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
a361672882 ddns-scripts: refactor start_daemon_for_all_ddns_sections()
Removed redundant if else condition. updater is launched
with the same verbosity value anyway.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
99da7eded2 ddns-scripts: refactor stop_daemon_for_all_ddns_sections()
Same functionality - code reads less 'shouty' and 'stabby'.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00
Paul Donald
2ab29cc06c ddns-scripts: refactor stop_section_processes()
Now a single xargs calls instead of grepping ps output (unreliable).

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-10 09:34:38 +02:00