Commit graph

283 commits

Author SHA1 Message Date
Richard Hansen
23b368f5ff Add missing final comma 2024-05-19 02:18:55 -04:00
Richard Hansen
27b5c535bc Use undef to disable required variables 2024-05-19 02:18:55 -04:00
Richard Hansen
4d1b3439ea Use service-common-defaults variables
This avoids a lot of duplication and improves readability by making it
easier to see service-specific variables.
2024-05-19 01:51:06 -04:00
Richard Hansen
6da30367d0 Inline unnecessary *-common-defaults variable definitions 2024-05-19 01:49:48 -04:00
Richard Hansen
5e3e10d32e Replace unnecessary merge function with hash initializers 2024-05-19 01:49:48 -04:00
Richard Hansen
52864f2bb1 Delete redundant variable definitions 2024-05-19 01:49:45 -04:00
Richard Hansen
03ad24829c Fix "Scalar value better written as" warning
Also some readability improvements.
2024-05-18 17:21:20 -04:00
Richard Hansen
6b7bf29e56 Move --use=cisco and --use=cisco-asa to %builtinfw
This simplifies the code and will make it easier to remove support for
these devices in the future.
2024-05-14 22:18:59 -04:00
Richard Hansen
d02a9cf6db Add infrastructure for custom logic in a %builtinfw entry 2024-05-14 22:18:59 -04:00
Richard Hansen
ee5bb2de90 Check, don't assume, that --use* names a firewall 2024-05-14 22:18:59 -04:00
Richard Hansen
474cc76587 Enable --usev4=cisco and --usev4=cisco-asa
These were implemented, but accidentally(?) left out of
`%ipv4_strategies` which prevented their use.
2024-05-14 22:18:59 -04:00
Richard Hansen
5cad38a047 Don't attempt to read file if open fails 2024-05-14 22:00:12 -04:00
Richard Hansen
2eacc71acc Logging improvements
* Consistently use logging functions instead of `print`
  * Wording/formatting fixes
  * Use `info(...)` instead of `verbose('VERBOSE:', ...)`
2024-05-14 22:00:12 -04:00
Richard Hansen
066b19af8f Error out if --daemon and --retry are both specified 2024-05-14 21:55:12 -04:00
Richard Hansen
2764cd8a10 Clarify what --retry does 2024-05-14 21:55:12 -04:00
Richard Hansen
498df75790 Fix "no hosts to update" warning condition 2024-05-14 21:55:03 -04:00
Richard Hansen
542bb28a13 Consistently use --arg instead of -arg 2024-05-14 18:00:14 -04:00
Richard Hansen
12222ff912 Clarify interaction between --use, --usev4, and --usev6 2024-05-13 18:53:19 -04:00
Richard Hansen
e35be25010 Reorder --help for --usev4 and --usev6 for readability
and for consistency with `--use`.
2024-05-13 18:53:19 -04:00
Richard Hansen
05304622ea Add context to --use deprecation notices in --help 2024-05-13 18:52:22 -04:00
Richard Hansen
a911f2bc0e Include --use=disabled and --use=no in --help usage 2024-05-13 18:40:05 -04:00
Richard Hansen
16fd4d948d Enable --use=disabled
It's unclear why this entry did not exist before now.
2024-05-13 18:37:33 -04:00
Richard Hansen
dfb2196499 Translate Perl version string to user-friendly version string
Perl version strings are flawed in a few ways.  Convert them to
user-friendly strings when printed so that Git tags and tarball names
are easier for downstream distributions to work with.
2024-05-12 16:43:43 -04:00
Richard Hansen
c9cec591f0 Add short option to --version argument
Passing `--version=short` simply prints the version and exits.  This
will make it possible for a future commit to change `configure.ac` to
extract the version string from `ddclient.in` to avoid maintaining the
same version string in two places.
2024-05-12 16:43:43 -04:00
Richard Hansen
58d7be4e83 Distinguish unset --*-skip settings from set to the empty string
This prevents the `%builtinweb` or `%builtinfw` skip defaults from
overriding a user's explicitly empty `--web-skip=` or `--fw-skip=`
setting.

This is technically a backwards-incompatible change: Any config that
explicitly sets `--web-skip` or `--fw-skip` to the empty string but
depends on the built-in skip behavior will fail.  This is unlikely to
affect many (if any) users; compatibility concerns are believed to be
far less significant than the potential need to turn off the built-in
skip.
2024-05-12 15:55:28 -04:00
Richard Hansen
281b7307a8 Fix misspelled *-ssl-validate option names
There is no `ssl-validate` option, and there never has been.
2024-05-10 16:54:40 -04:00
Richard Hansen
d525e28c20 Show original user input in debug message
Also add comments explaining the purpose of the lines, because it's
not immediately clear.
2024-05-07 23:04:20 -04:00
Richard Hansen
b7dd590300 Fix misleading, unclear, redundant, and unnecessary warnings 2024-05-07 23:04:20 -04:00
Richard Hansen
57f15bcb97 Don't modify $usev6 to avoid misleading log messages 2024-05-07 23:04:20 -04:00
Richard Hansen
908b728503 Refine --help usage for --use* strategies 2024-05-06 00:21:13 -04:00
Richard Hansen
09b42a78bd Use --arg instead of -arg or arg in --help usage
`--arg` is preferred over `-arg` because the broader convention is to
use double hyphens for long option names.  Perl accepts either.

`--arg` is preferred over `arg` to avoid confusion between `--use=ip`
and `--ip` and similar option pairs.
2024-05-06 00:21:13 -04:00
Richard Hansen
6ac1ee45b0 Consistently use -arg=val in --help usage 2024-05-06 00:21:13 -04:00
Richard Hansen
fc4daae0cd Consistently use | in placeholders for --help usage 2024-05-06 00:21:12 -04:00
Richard Hansen
77c9cb5512 Consistently use < and > for placeholders in --help usage 2024-05-06 00:21:12 -04:00
Richard Hansen
dac72a344c Remove unimplemented --usev* strategies from --help usage
The `ciscov4`, `ciscov6`, `cisco-asav4`, and `cisco-asav6` strategies
were never implemented, and it doesn't make sense to implement them
because the `v4` and `v6` variants don't follow the pattern
established by the `%builtinfw` strategies.

The `%builtinfw` strategies were never implemented for `--usev6`.
2024-05-06 00:21:12 -04:00
Richard Hansen
640a6f08d7 Fix indentation in --help output 2024-05-06 00:21:12 -04:00
Toni Wiki
e6e0072e8d dondominio: Fix service response treatment 2024-03-28 12:56:09 +01:00
Lenard Hess
981dd5f333 Fixed _env suffixed config variables causing errors in check_value() 2024-03-19 22:03:20 +01:00
Lenard Hess
12e9a7c47b gandi: Added support for personal access tokens 2024-03-19 21:48:30 +01:00
Lenard Hess
9b7714c39c Revert "gandi: Changed authorization to personal access token"
This reverts commit a57cb3b9ff.

See https://github.com/ddclient/ddclient/issues/602 for more info.
2024-03-19 21:48:30 +01:00
Lenard Hess
0be0cc6953
Merge pull request #627 from etkal/Fix-porkbun-root-domain-update
porkbun code not handling root domain
2024-02-25 16:19:06 +01:00
Lenard Hess
28bb7d076a
Merge pull request #628 from ikruglov/fix-googledomains-warning
fix warning "Argument "googledomains" isnt numeric in numeric eq (==)
2024-02-25 16:10:15 +01:00
Rüdiger Hahn
8246c65ba8
Fix for getting url for keysystems 2024-02-14 22:36:48 +01:00
Ivan Kruglov
e47e63d91e fix warning "Argument "googledomains" isnt numeric in numeric eq (==) at /usr/sbin/ddclient line 2736. 2024-02-13 18:16:38 +01:00
Lenard Hess
a57cb3b9ff gandi: Changed authorization to personal access token
The previous API key mechanism has been deprecated.
See https://github.com/ddclient/ddclient/issues/602 for more.
2024-02-10 12:30:46 +01:00
Erik Tkal
4e33dd754f porkbun code not handling root domain 2024-02-05 18:21:58 -05:00
Lenard Hess
5b104ad116 Switch the defaults for webv4 and webv6 to dyndns
The googledomains option (https://domains.google.com/checkip) is soon to be
deprecated by Google (see https://github.com/ddclient/ddclient/issues/622).
2024-02-04 11:26:51 +01:00
Lenard Hess
330ddc6bd2 porkbun: Moved subdomain processing out of IPv4/6 loop
The domain/subdomain processing is the same for IPv4 and IPv6, no need to repeat it
2024-02-03 16:18:55 +01:00
Lenard Hess
ae7f92772b porkbun: Updated documentation and config example 2024-02-03 16:13:13 +01:00
Lenard Hess
5e7609ea2a porkbun: Added 'root-domain' config option
Porkbun API requires separation of the root domain and subdomains.
Previously ddclient only supported one layer of subdomain or the root domain
by selecting between the two with the boolean 'on-root-domain'.

This change now allows to specify the root domain via the 'root-domain' parameter
ddclient will then split the host domain into root and subdomain
2024-02-03 13:57:09 +01:00
Lenard Hess
f1c77a06fb Added missing exit to -version argument 2024-02-03 13:50:34 +01:00
Lenard Hess
bab66330ca Added -version argument 2024-02-03 13:31:26 +01:00
Awalon
f5a1a906d1 Pull request #560: Updated GoDaddy to new IPv4/IPv6 logic
Changes by Lenard Hess based on Awalon's pull request:
- Rebased to master
- Removed use=disabled addition from this commit
2024-01-28 16:40:18 +01:00
Lenard Hess
fc4f87b33e
Merge pull request #616 from retep/retep-patch-1-1
Update Mythic Beasts mythicdyn module in ddclient.in
2024-01-14 14:09:47 +01:00
Lenard Hess
95ac201b4b
Merge pull request #603 from indrajitr/noip-v4-v6
noip: Adjust script to support simultaneous IPv4 and IPv6 updates
2024-01-14 13:59:10 +01:00
Marco Emilio "sphakka" Poleggi
dc84a74c7e fix(curl, doc): enable HTTP 30x redirections in curl requests. Fixes Issue #589
- curl: enable a configurable number of redirections (-redirects=<max>) to
  follow when making HTTP(S) requests.
- docs: update Infomaniak example to prefer 'dyndns2' instead of obsolete
  protocol.

Signed-off-by: Marco Emilio "sphakka" Poleggi <7766137+sphakka@users.noreply.github.com>
2024-01-13 15:53:56 +01:00
Lenard Hess
203fe47aa1
Merge pull request #604 from indrajitr/nsupdate-v4-v6
nsupdate: Adjust script to support simultaneous IPv4 and IPv6 updates
2024-01-13 15:04:47 +01:00
PeterF
6994b05ab6
Update ddclient.in
The mythicdyn module is modified so that it will update either or both V4 and/or V6 addresses depending upon which specific address parameters have been defined in the config file. The module examines the wantipv4 and wantipv6 parameters.
If required, both addresses will be updated in a single invocation.
2024-01-11 16:01:11 +00:00
Lenard Hess
ad854ab716 Fixed legacy providers not supporting usev6 2024-01-06 18:03:26 +01:00
Lenard Hess
3c522a7aa2 Config parsing: Allow trailing comments after a backslash in the config
The cloudflare documentation example had lines with a comment after a
backslash. This actually did not work in the parser until now.

The lines in question:
	#protocol=cloudflare,        \
	#zone=domain.tld,            \
	#ttl=1,                      \
	#login=your-login-email,     \ # Only needed if you are using your global API key. If you are using an API token, set it to "token" (without double quotes).
	#password=APIKey             \ # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones".
	#domain.tld,my.domain.tld
2024-01-04 18:21:48 +01:00
Matthew Ogilvie
d195bcc4b8 If present, give URL protocol precedence over other SSL settings 2024-01-04 16:25:27 +01:00
Indrajit Raychaudhuri
bfe20e75f8 nsupdate: Adjust script to support simultaneous IPv4 and IPv6 updates
Adjust `nic_nsupdate_update` to use `wantipv4` and `wantipv6` and
support simultaneous IPv4 and IPv6 updates.

Also, set proper `status-ipv4` and `status-ipv6` values after successful
update.
2023-12-02 15:38:33 -06:00
Indrajit Raychaudhuri
8c8a193a70 noip: Adjust script to support simultaneous IPv4 and IPv6 updates
Adjust `nic_noip_update` to use `wantipv4` and `wantipv6` and support
simultaneous IPv4 and IPv6 updates.

Note: Unlike `nic_dyndns2_update`, `$returnedips` actually contains
valid IPv4 and IPv6 addresses, so we can use the response to update the
status.
2023-12-02 15:35:14 -06:00
Lenard Hess
e0611ab192 Merge pull request #558 from TinfoilSubmarine/fix/gandi 2023-11-25 13:55:09 +01:00
Stewart Whitman
2ceb4a9526 Resolves #585 - inheritance for noip service 2023-11-25 13:24:44 +01:00
Joel Beckmeyer
c382af56a5 don't print erroneous IP version 2023-11-25 13:07:08 +01:00
Joel Beckmeyer
846ab59e68 gandi: improve documentation 2023-11-24 15:56:37 -05:00
Joel Beckmeyer
5ec8bfe141 gandi: update logic
- allow updating IPv6/AAAA
- allow updating A and AAAA records simultaneously
- skip updating if record already has same IP
2023-11-24 15:56:37 -05:00
Lenard Hess
baa7e440ed Updated version number for v3.11.3_0 development 2023-11-23 13:08:07 +01:00
Lenard Hess
4a1b06630b Updated version number for v3.11.2 release 2023-11-23 13:06:21 +01:00
Lenard Hess
5d022b0520 Fixed caching for new providers with legacy 'use' parameter
When the configuration used the legacy 'use' parameter, we already
populated the new internal 'wantipv*' field alongside the legacy
'wantip' field. This allows both old and new providers to work.

The legacy providers set 'status'/'ip'.
The new providers then set 'status-ipv*'/'ipv*'.

The caching logic would look for 'status' and 'ip' when encountering a
'use' parameter in the config. We previously already changed ddclient to
set 'status' when 'status-ipv*' was set. Now we also set 'ip' from
'ipv*'. This ensures caching correctly works.
2023-11-23 13:00:06 +01:00
Indrajit Raychaudhuri
3a224b66a4 duckdns: Adjust script to support simultaneous IPv4 and IPv6 updates 2023-11-02 19:34:45 -05:00
Lenard Hess
23bfa31ea5 Updated version number for v3.11.2_0 development 2023-10-25 21:25:43 +02:00
Lenard Hess
66af014aad Updated version number for v3.11.1 release 2023-10-25 21:22:47 +02:00
Lenard Hess
456fe79c2d Removed @PACKAGE_VERSION@ placeholder from ddclient for now.
This reverts the changes from 36744e5. This will be reimplemented once
the build process is better documented and properly implemented
by any downstream not yet using it (as of now linuxserver.io).

See https://github.com/linuxserver/docker-ddclient/issues/77
2023-10-25 21:19:18 +02:00
Joel Beckmeyer
2d7610b7de porkbun: rework logic to allow for simultaneous update of IPv4 and IPv6 2023-10-21 17:52:35 -04:00
jortkoopmans
9913e0ec29 DNSExit update for ipv6.
- Support wantipv4 and wantipv6 configs automatically
- Remove manual record type setting
- Add support for hosts on your zone (subdomain)
- Update config examples
- Code/logic improvements
2023-10-21 20:36:48 +01:00
Reuben Thomas
ef496d108f Revert URLs to canonical repo 2023-07-19 22:27:44 +03:00
Lenard Hess
1715bd3a17 Fixed hosts trying to update if IP acquisition failed 2023-07-19 17:11:45 +03:00
Lenard Hess
7869acb266 easydns, porkbun: Set status-ipv4 and status-ipv6 instead of status
This fixes caching issues when using the 'usev4' or 'usev6' parameters.
Without this, the "min-interval" and "warned-min-interval" limits will
not work.

For the legacy 'use' parameter, the wrapping code takes care of
translating 'status-ipv*' to 'status'.
2023-07-19 17:11:45 +03:00
Lenard Hess
17fd6ec083 Added preliminary explanation for provider functions 2023-07-19 17:11:45 +03:00
Lenard Hess
6c1f9632fa Fixed caching behaviour for new providers with legacy 'use' logic 2023-07-19 17:11:45 +03:00
Reuben Thomas
541e7f350c Update error message to reflect that curl is always used 2023-07-19 17:11:45 +03:00
Lenard Hess
379b1832de ddclient.in: Update Maintainers 2023-07-19 17:11:45 +03:00
Reuben Thomas
b8bed7112f Remove defunct dnsexit protocol 2023-07-19 17:11:45 +03:00
Reuben Thomas
a9c1e545fb Require curl
Use command-line curl, and remove alternative Perl and Curl-via-Perl
implementations of network code.
2023-07-19 17:11:45 +03:00
Reuben Thomas
211404b5d1 ddclient.in: update maintainer details 2023-07-19 17:11:45 +03:00
Lenard Hess
52b5eea6f4 Implemented _env suffix for configuration
With this change, any config value may be set through an environment
variable by appending '_env' to the keyword (i.e. 'password_env' instead
of 'password') and setting the value to the name of the environment
variable that contains the actual configuration value.

This allows keeping sensitive info (i.e. login and password)
out of the configuration file.

Example configuration snippet:
	protocol=namecheap,                       \
	server=dynamicdns.park-your-domain.com,   \
	login_env=DD_LOGIN,                       \
	password_env=DD_PASSWORD                  \
	@
With this configuration snippet, ddclient will use the contents of
DD_LOGIN as the login value and the contents of DD_PASSWORD as the
password value.
These can in turn be supplied via the command line, .env files or any
other mechanism to safeguard sensitive information.
2023-07-19 17:11:45 +03:00
Lenard Hess
2af841acdb Changed password config regex
The password regex searches for password assignments, extracts the
password and replaces it with a dummy value to prevent it being logged.

This change adjusts the password regex to no longer accept trailing
characters behind the password string
2023-07-19 17:11:45 +03:00
jortkoopmans
ec4d83bc3f Add support for new DNSExit API (adding protocol dnsexit2). 2023-07-19 17:11:45 +03:00
Sandro
2536a5e37a
Merge pull request #480 from michal-josef-spacek/fix_inet6
Rewrite deprecated use of IO::Socket::INET6 to new solution with IO::Socket::IP
2023-06-28 22:54:26 +02:00
Ziemowit Łąski
d3d7bda8ca Extend ZoneEdit polling interval to 10min 2023-06-03 00:42:28 -07:00
Ziemowit Łąski
218e1a9974 Squelch 'postscript' warning 2023-06-03 00:42:28 -07:00
Ziemowit Łąski
bbed067864 Fix script failures on ZoneEdit 2023-06-03 00:35:51 -07:00
Timothée Andres
82af20f8d4
Add infomaniak protocol (#537) 2023-06-01 13:47:53 +02:00
Franco Fichtner
1c91a5aa84
dyndns2: fix multiline parsing and multiple host handling (#542) 2023-06-01 10:46:04 +02:00
rolltack
aedf6f866b
Fix bug #501: (Keysystems) removed wrong parameter
Looks like there is a bug in line 542 in ddclient.in. The syntax of how the server URL is being set is different to all the other dynamic DNS services. To be precise there is one additional parameter. Instead of handing over the URL, the server variable receives the second "1" in the code below.
2023-04-15 23:53:06 +01:00
{16/7}
e92c54f6f9 Allow postscript to take args
$globals{postscript} can now contain a full command string including
arguments. In order to facilitate this, the file executability check
(-x) has been modified such that the first substring up to the first
space (if it exists) is what is checked, rather than the whole string.
2023-04-04 14:58:39 -07:00
Thomas Hebb
c436a34ede Add support for Digital Ocean 2023-03-14 11:49:10 -04:00
Sandro
b49bd9eda9
Merge pull request #519 from tchebb/fix-whitespace
Fix a few whitespace issues and a typo
2023-03-14 14:35:23 +01:00