Commit Graph

259 Commits

Author SHA1 Message Date
Hannu Nyman b74ca8feb2 ddns-scripts: Adjust descriptions in Makefile for apk
Having both double quotes and parentheses in package
description may lead into troublewith apk, if parentheses
are located so that they get passed "outside" the quoted
parameter, and get interpreted as a token for shell.

Example:
 ash: -c: line 1: syntax error near unexpected token `('
 bash: -c: line 1: `/OpenWrt/e8450/staging_dir/host/bin/fakeroot
 /OpenWrt/e8450/staging_dir/host/bin/apk mkpkg --info "name:ddns
 -scripts-pdns" --info "version:2.8.2-r51" --info "description:D
 ynamic DNS Client scripts extension for "PowerDNS" via API. It
 requires: "option param_opt(Optional Parameter)" to be a valid

Avoid that by using single quotes in the detailed descriptions.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-11-10 13:45:55 +02:00
Xiaolong Zhang b962029fa8 ddns-scripts: add colon char in DNS_CHARSET
The IPv6 address is separated by ':' instead of '.', so we need to add
':' in DNS_CHARSET.

See: 'https://github.com/openwrt/packages/issues/25051'

Fixes: #25051

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* bump PKG_RELEASE
* update commit message

Signed-off-by: Xiaolong Zhang <xliilQwQ@outlook.com>
2024-11-07 08:11:03 +01:00
Dillon Dixon b3d9e90942 ddns-scripts: porkbun bugfix for subdomain on A/AAAA record
If the "name" parameter is not provided, then updates to a subdomain
A/AAAA record result in the subdomain being removed from the record.
This change always provides the "name" parameter to correct that behavior.

Signed-off-by: Dillon Dixon <github@dillon.io>
2024-10-30 10:37:49 +01:00
Lehua Zhang 9e86e22808 ddns-scripts: add ddns-scripts for huaweicloud
Signed-off-by: Lehua Zhang <sxlehua@qq.com>
2024-10-15 09:13:52 +02:00
Florian Eckert d9cc0e1cd4 ddns-scripts: fix update_porkbun_v3 shell syntax
The closing bracket was forgotten in a function.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-09-25 16:36:22 +02:00
Ansel Horn 5f5e6cd179 ddns-scripts: add support for Porkbun
Extends DDNS support for the Porkbun v3 JSON API with a custom update
script and service configuration.

See: https://porkbun.com/api/json/v3/documentation

Depends on cURL (with SSL) for transport. Porkbun authentication API keys
and secret keys are passed through the ddns-scripts "username" and
"password" variables, respectively. As Porkbun DNS is currently backed by
Cloudflare, also support ddns-scripts "rec_id" variable for specific
record targeting.

Signed-off-by: Ansel Horn <dev@cahorn.net>
2024-08-22 16:02:59 +02:00
Karol Kolacinski 33ecb97bc3 ddns-scripts: Add IPv6 and https for OVH
ovh.com supports https and IPv6 since March 2024.
New API operates under domain dns.eu.ovhapis.com
Add IPv6 support, use https and updated domain for ovh.com.

Signed-off-by: Karol Kolacinski <kolacinskikarol@live.com>
2024-08-22 08:26:28 +02:00
Denis Shulyaka ebeae334d9
ddns-scripts: Update knot resolver regexp
The output format of `khost` has changed. This commit fixes the regexp
for IPv4. It fixes the issue of using a custom DNS to resolve current
address.

```bash
root@localhost:~# khost ns2.afraid.org
ns2.afraid.org. has IPv4 address 69.65.50.223
ns2.afraid.org. has IPv6 address 2001:1850:1:5:800::6b
Host ns2.afraid.org. has no MX record
root@localhost:~# khost --version
khost (Knot DNS), version 3.3.5
```

Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>
2024-07-17 13:44:36 +03:00
Florian Eckert c90ddcaddd ddns-scripts: do not verify DNS server on start
When the ddns update script is started, the system checks whether the
configured DNS server can be reached. This is checked with the 'netcat' tool.
The tool tries to establish a TCP connection on port 53 of the configured
DNS server.

The problem with this implementation is, that this call blocks the ddns
update script until 'netcat' returns from the call.

Verfification failed:
If the IP and the port cannot be reached, the netcat call returns
immediately.

Verfification successfull:
If the IP and the port of the DNS server can be reached, the connection
remains established and so the ddns update scripts blocks until the
configured TCP session timeout of the DNS server resets the connection.

The behavior in the event of an successfull verificataion is a problem
for the ddns update script if it is called via the hotplug. Since the ddns
update script runs too long! This blocking behavior also depends on
the TCP session timeout setting of the DNS server.

> time netcat 1.1.1.1 53
netcat 1.1.1.1 53  0.00s user 0.00s system 0% cpu 10.016 total

> time netcat 8.8.8.8 53
netcat 8.8.8.8 53  0.00s user 0.00s system 0% cpu 2.012 total

The TCP session timeout is for 1.1.1.1 10 seconds and for 8.8.8.8 2 seconds.

The '--wait' option of necat or the additional integration of the 'timeout'
function of busybox was implemented for this behavior. But the used '--wait'
function of netcat of the busybox shows no effect here.

Since the used implementation is not clean, the question arise why this
is necessary for the ddns update script at all? As the nslookup throws an
error anyway if it cannot resolve the IP. This check is only informative.
The check does not affect the script behavior.

The check is therefore removed on ddns update.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-05-17 12:39:19 +02:00
Miguel Angel Mulero Martinez 525182892b ddns-scripts: fix duplication of processes when reloading
When a "service ddns reload" is issued, the ddns processes are being
duplicated.
It seems the culprit is the -1 in the 'killall' command, and removing it
fixes the issue.
The -1 means to use SIGHUP, instead of the default SIGTERM.
In this case, the idea is to kill all other processes, so SIGTERM is
appropriate. In case the processes hang, SIGKILL may be another option.

Signed-off-by: Miguel Angel Mulero Martinez <migmul@gmail.com>
2024-05-14 21:18:58 +02:00
Patrick Hemmen 0d63145d58 ddns-scripts: Add servercow.de as DDNS provider
Add servercow.de as dynamic DNS provider provider.

Signed-off-by: Patrick Hemmen <jummo4@yahoo.de>
2024-03-19 18:24:11 +01:00
Max Berger 86a620f644 ddns-scripts: Fix Route53 provider
This fixes the Invalid Resource Record: FATAL problem: ARRDATAIllegalIPv4Address error message described in https://forum.openwrt.org/t/route53v1-script-error/160068

Maintainer: @chris5560, @maxberger, @dibdot
Tested: Checked on local system
Signed-off-by: Max Berger <max@berger.name>
2023-11-25 16:27:18 +01:00
Igor Baidasov a80fec4850 ddns-scripts: add new DDNS provider ipnodns.ru
Signed-off-by: Igor Baidasov <igorbay@bk.ru>
2023-10-18 12:56:58 +03:00
Julian Grinblat 565fda4105
ddns-scripts: add ddns-scripts-utils package
The samples in the repo are useful for configuring cenrtain aspects of
ddns, and their inclusion is hinted at within their source code

Signed-off-by: Julian Grinblat <julian@dotcore.co.il>
2023-10-06 18:08:59 +09:00
danielpinto8zz6 f425e37fb0 ddns-scripts: desec.io - update url to https
Signed-off-by: Daniel Pinto <danielpinto8zz6@gmail.com>

desec.io ddns update is not working, after testing the endpoint I got a 301, after a bit of search I found out we are
supposed to use https instead of http
more info here: https://talk.desec.io/t/301-from-update-dedyn-io/644/2

bump PKG_RELEASE
2023-09-04 23:17:58 +01:00
Baptiste Fouques 1ea13ed8a1 ddns: Prevent clearing of desec.io entries
When using both ipv4 and ipv6 entries on the same host, ddns is clearing A
(or AAAA) record depending on the connection (ipv4 or ipv6).

see https://desec.readthedocs.io/en/latest/dyndns/update-api.html#determine-ip-addresses

Signed-off-by: Baptiste Fouques <bateast@duck.com>
Update comment and bump PKG_RELEASE number.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-06-12 16:03:04 +02:00
Jim Hague 12544affe9 ddns-scripts: Add v2 API for mythic-beasts.com provider
Use USERNAME as the key, PASSWORD as the secret.

Signed-off-by: Jim Hague <jim.hague@acm.org>
2023-03-09 15:39:58 +00:00
Tobias Hilbig 05c42cc0e9 ddns-scripts: Add njal.la provider
Add njal.la provider. Use the key as password. Username is not needed.

Signed-off-by: Tobias Hilbig <web.tobias@hilbig-ffb.de>
2023-02-25 11:49:19 +01:00
James Buren 5e7a5a3304 ddns-scripts: enable IPv6 for easydns.com
easydns.com has supported IPv6 for awhile now using
the same update URL as IPv4. This duplicates the IPv4
entry for IPv6 to enable support for it.

Signed-off-by: James Buren <braewoods+mgh@braewoods.net>
2023-02-22 19:24:21 -06:00
Benjamin Drung 8ff6537f42 ddns-scripts: add hosting.de provider
Add hosting.de provider. To use dynamic DNS you have to create a DDNS
host with a separate DDNS user.

Note: As of 2023-01-17 hosting.de does not work with wget which will
fail with `400: Bad Request` (it will work with `--auth-no-challenge`).
You should use curl instead. I have reported that to the provider.

Signed-off-by: Benjamin Drung <bdrung@bdrung.de>
2023-01-18 00:14:02 +01:00
Jihoon Han 79257dfb7c ddns-scripts: add support for LuaDNS
Signed-off-by: Jihoon Han <rapid_renard@renard.ga>
2023-01-09 18:26:29 +09:00
Patrick Grimm 6b436c9882 ddns-scripts: add strato ipv6 support
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
2023-01-08 15:49:06 +01:00
Cristian Le ff099ea53c
ddns-scripts: Allow setting root record for pdns script
Signed-off-by: Cristian Le <git@lecris.me>
2022-12-31 22:21:42 +01:00
Tianling Shen f7b73bf000
Merge pull request #19982 from golddranks/master
ddns-scripts: update_gandi_net: improve logging & add timeout
2022-12-13 03:59:46 +08:00
Pyry Kontio cefe85250c
ddns-scripts: update_gandi_net: improve logging & add timeout
- Improved logging
  - Log the executed curl command to be able to rerun and test it manually
  - Log the curl exit status
- Added 30 second timeout timeout for clear-cut detection of flaky connections.

Signed-off-by: Pyry Kontio <pyry.kontio@drasa.eu>
2022-12-10 03:37:19 +09:00
Chris Barrick cbdc67bd10 ddns-scripts: add support for Google Cloud DNS
The implementation uses a GCP service account. The user is expected to
create and secure a service account and generate a private key. The
"password" field can contain the key inline or be a file path pointing
to the key file on the router.

The GCP project name and Cloud DNS ManagedZone must also be provided.
These are taken as form-urlencoded key-value pairs in param_enc. The TTL
can optionally be supplied in param_opt.

Signed-off-by: Chris Barrick <chrisbarrick@google.com>
2022-12-08 22:04:33 -05:00
Michal Vasilek 001564ed83
ddns-scripts: fix cloudflare&digitalocean provides
Fixes mistake in dbe79e409d, the
cloudflare PROVIDES got mixed up with digitalocean.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-10-18 13:45:52 +02:00
Michal Vasilek dbe79e409d
ddns-scripts: add PROVIDES for old package names
* ddns-scripts-services: provide ddns-scripts_service
* ddns-scripts-cloudflare: provide ddns-scripts_digitalocean.com-v2
* ddns-scripts-freedns: provide ddns-scripts_freedns_42_pl
* ddns-scripts-godaddy: provide ddns-scripts_godaddy.com-v1
* ddns-scripts-noip: provide ddns-scripts_no-ip_com
* ddns-scripts-nsupdate: provide ddns-scripts_nsupdate
* ddns-scripts-route53: provide ddns-scripts_route53-v1
* ddns-scripts-cnkuai: provide ddns-scripts_cnkuai_cn

https://github.com/openwrt/packages/pull/13509 renamed many ddns-scripts
packages, but didn't include a PROVIDES for the old package names to
make updates work well.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-10-12 19:20:54 +02:00
Rafał Miłecki f93cc0e22f ddns-scripts: add explicit "-d" switch for Dry Run
It was a bit confusing to use *verbosity* level for Dry Run mode. Add
explicity switch for it and designed DRY_RUN variable to make code
easier to understand.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-28 09:49:39 +02:00
Rafał Miłecki 586e283a51 ddns-scripts: rename variable: s/ERR_UPDATE/RETRY_COUNT/
Rename variable to make code easier to understand. This variable
specifies how many times in row ddns script tried to update IP without a
success.

Previous name ("ERR_UPDATE") didn't suggest it was for counting
anything. It also didn't specify was error was it related to.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-27 17:46:04 +02:00
Rafał Miłecki a6247d81a9 ddns-scripts: replace IP type (name) "local" with "current"
Local suggests something related to the local network or available
locally only. All that code related to the "local" IP was actually
dealing with *current* device external IP address. Using name "current"
should make code a bit easier to understand.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-27 17:42:58 +02:00
Rafał Miłecki e3292e4c97 ddns-scripts: rename variable: s/retry_count/retry_max_count/
Rename variable to make code easier to understand. This variable
specifies how many times ddns script should try to send a request.

Previous name ("retry_count") suggested it was for *counting* attempts.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-27 17:42:58 +02:00
Rafał Miłecki dad2be532d ddns-scripts: drop dead services
Drop services that are not available anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-09-12 15:27:42 +02:00
Florian Eckert bb79972f8d
Merge pull request #19030 from tomsommer/tomsommer-patch-1
ddns-scripts: Add Simply.com provider
2022-08-30 13:47:47 +02:00
Bheesham Persaud ad7f24684e
ddns-scripts: Fix typo s/ganid/gandi/
Signed-off-by: Bheesham Persaud <me@bheesham.com>
2022-08-17 13:55:41 -04:00
Tom Sommer 28c1db8997 ddns-scripts: Add simply.com provider
Signed-off-by: Tom Sommer <tomsommer@users.noreply.github.com>
2022-07-25 09:03:11 +02:00
Shengjiang Quan 1a53aaa6cd ddns-scripts: mydns.ip to mydns.jp
The provider is `mydns.jp` not `mydns.ip` which is wrong and misleading.

Signed-off-by: Shengjiang Quan <qsj287068067@126.com>
2022-05-12 20:48:42 +09:00
André Herbst 07dec08c78 ddns-scripts: remove extra pipe
The extra pipe caused an error WARN : PID 'xyz' exit WITH ERROR '2' when executing ddns update.
Signed-off-by: André Herbst <moormaster@gmx.net>
2022-01-31 10:46:40 +01:00
Luca Conte 60047cdce1 ddns-scripts: add one.com provider
Signed-off-by: Luca Conte <main@lugico.de>
2022-01-27 13:59:42 +01:00
Florian Eckert b4694bb82c
Merge pull request #17617 from hgl/ddns-cloudflare
ddns-scripts-cloudflare: fix shell conditional
2022-01-15 16:03:37 +01:00
Glen Huang aed4dbf349 ddns-scripts-cloudflare: fix shell conditional
Signed-off-by: Glen Huang <heyhgl@gmail.com>
2022-01-15 22:33:28 +08:00
Claudio Marelli dc0953fedd ddns-scripts: pass user agent string
This adds a user agent string to the wget request.

Fixes #17507

Signed-off-by: Claudio Marelli <camarelli@gmx.net>
2022-01-15 10:07:30 +01:00
Glen Huang 78ef7d7379 ddns-scripts-cloudflare: allow explicit zone_id
When zone id is explicitly provided, there is no need for the API token to have read permission. Inspired by acme.sh's cloudflare logic.

Signed-off-by: Glen Huang <heyhgl@gmail.com>
2022-01-10 20:44:40 +08:00
Richard Yu 9e6dd11484
ddns-scripts: add ns1.com provider
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2021-12-15 18:22:56 +08:00
Martijn Atema aa820a2cae ddns-scripts: Add script for TransIP.nl
Signed-off-by: Martijn Atema <martijn@atema.one>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
- PKG_RELEASE number updated
2021-11-30 13:10:57 +01:00
Peter Gransdorfer c0296bf25d ddns-scripts: use HTTPS for spdyn
Signed-off-by: Peter Gransdorfer <peter.gransdorfer@cattronix.com>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
- PKG_RELEASE number updated
2021-11-30 12:55:23 +01:00
George Giannou 49defda70c ddns-scripts: Fix DigitalOcean JSON payload
Signed-off-by: George Giannou <giannoug@gmail.com>
2021-11-29 13:00:36 +02:00
Florian Eckert fdb471ab9e
Merge pull request #17120 from giannoug/ddns-scripts-digitalocean
ddns-scripts: Rework DigitalOcean update script
2021-11-17 11:02:01 +01:00
George Giannou 550817815e ddns-scripts: Rework DigitalOcean update script
Signed-off-by: George Giannou <giannoug@gmail.com>
2021-11-15 16:24:30 +02:00
Martijn Atema de2a9d4b13
ddns-scripts: Fix typo in route53 update script
Signed-off-by: Martijn Atema <martijn@atema.one>
2021-11-15 12:44:41 +01:00