Richard Hansen
282bb01e17
Bump version to v3.12.0~alpha
...
Enough has changed to warrant a minor revision bump.
2024-06-01 03:49:16 -04:00
Richard Hansen
e60e6e804b
group_hosts_by: Use Data::Dumper
to make the group signature
...
This is a bit more robust than manually making the group signature
because it gracefully handles corner cases such as `undef`.
2024-06-01 03:06:06 -04:00
Richard Hansen
f4802fc534
Fix group_hosts_by
call for IPv6-enabled services
2024-06-01 03:05:36 -04:00
Richard Hansen
343fcff625
group_hosts_by: Add support for wantipv4
, wantipv6
2024-06-01 03:05:36 -04:00
Richard Hansen
f976b771d4
dnsexit2: Fix logging of erroneous response body
2024-05-30 18:29:38 -04:00
Richard Hansen
f7f4856b93
dnsexit2: Combine related log messages
2024-05-30 18:28:57 -04:00
Richard Hansen
24a22092ca
dnsexit2: Don't croak if JSON decoding fails
2024-05-30 18:22:59 -04:00
Richard Hansen
d28c8ea7ad
dnsexit2: Delete unnecessary debug messages
2024-05-30 17:56:51 -04:00
Richard Hansen
7b95b379aa
dnsexit2: Fix extraction and processing of JSON response body
2024-05-30 17:52:12 -04:00
Richard Hansen
2a47b17541
dnsexit2: Include the unexpected status in the error message
2024-05-30 16:26:44 -04:00
Richard Hansen
d8a1449a19
dnsexit2: Fix error message format string
...
This fixes a bug introduced in commit
2bf6d348b0
.
2024-05-30 16:25:25 -04:00
Richard Hansen
6e5e2ab63f
dnsexit2: Remove https://
from update service URL
...
This allows the `ssl` setting to control TLS vs. plain HTTP, and makes
it possible to create a compatible service that doesn't use TLS (e.g.,
for testing).
2024-05-30 16:21:25 -04:00
Richard Hansen
eebb1b8a47
dnsexit2: Delete redundant status-ipv*
assignments
2024-05-30 16:19:41 -04:00
Richard Hansen
3c84f7a1b5
dnsexit2: Delete unnecessary debug messages
2024-05-30 04:49:46 -04:00
Richard Hansen
5b7400ae7d
dnsexit2: Normalize the zone up front
2024-05-30 04:48:44 -04:00
Richard Hansen
46bca54393
dnsexit2: Fix string interpolation
2024-05-30 04:04:19 -04:00
Richard Hansen
da9f39917f
dnsexit2: Inline some unnecessary variables
2024-05-29 18:29:09 -04:00
Richard Hansen
6c89eaf4ac
dnsexit2: Build updates array directly, not hash to array
...
to improve readability, and to make it easier to use
`group_hosts_by()` in the future to update multiple hosts at the same
time.
2024-05-29 18:25:24 -04:00
Richard Hansen
2bf6d348b0
dnsexit2: Reuse the $url
variable
2024-05-29 18:25:24 -04:00
Richard Hansen
4804e15c12
dnsexit2: Add final comma after last list item
...
for consistency, and to avoid bugs if additional items are added or
the items are reordered.
2024-05-29 18:25:24 -04:00
Richard Hansen
7c4fe28bab
dnsexit2: Simplify IP version loop
2024-05-29 17:57:20 -04:00
Richard Hansen
40d1bc8e51
dnsexit2: Clarify comments
2024-05-29 17:51:54 -04:00
Richard Hansen
18007dda8a
dnsexit2: Delete unnecessary comments
...
Comments should only be used if the code is doing something
subtle/tricky/non-obvious/unusual, otherwise they're distracting and
might get out of sync with the code (in which case it becomes
difficult to tell if it's the comment or the code that's wrong). If
the code is difficult to understand without comments but is doing
something ordinary, then the code needs to be modified to improve
readability.
2024-05-29 17:51:54 -04:00
Richard Hansen
61d34a9157
dnsexit2: Move code meanings closer to where it is used
2024-05-29 17:42:35 -04:00
Richard Hansen
df81075e49
dnsexit2: Rename variable to avoid confusion
2024-05-29 17:41:34 -04:00
Richard Hansen
ed7f4a68a4
dnsexit2: Rewrite circuitous variable assignments
2024-05-29 17:34:51 -04:00
Richard Hansen
3e91fd02bf
dnsexit2: Invert conditions to improve readability
...
Instead of:
if ($success1) {
if ($success2) {
if ($success3) {
# yay
} else {
# fail
}
} else {
# fail
}
} else {
# fail
}
do:
if (!$success1) {
# fail
}
if (!$success2) {
# fail
}
if (!$success3) {
# fail
}
# yay
2024-05-29 17:21:39 -04:00
Richard Hansen
9b1a785c6d
dnsexit2: Don't repeat the same success message
2024-05-29 17:15:24 -04:00
Richard Hansen
3a5e86b4d2
dnsexit2: Convert string interpolation to sprintf
format specifier
...
Rationale:
* For consistency.
* It's generally not a good idea to mix interpolation with `sprintf`
because the interpolated string itself might coincidentally (or
maliciously) contain format specifiers.
2024-05-29 17:10:06 -04:00
Richard Hansen
6cdf5da9f4
dnsexit2: Rename variable for brevity
2024-05-29 17:05:54 -04:00
Richard Hansen
63989d96fb
dnsexit2: Move variable declaration to loop scope
2024-05-29 17:02:46 -04:00
Richard Hansen
0040fc9608
dnsexit2: Whitespace fixes
2024-05-29 17:02:46 -04:00
Richard Hansen
a91ca7a199
s/foreach/for/g for consistency
2024-05-29 16:48:00 -04:00
Joel Croteau
61b979c49e
New 'emailonly' protocol that simply sends an email on IP change
...
This adds a protocol to email IP address changes without needing a
dynamic DNS service. This is useful if you don't use a DDNS service
but want to be notified when the IP of a machine changes.
2024-05-25 00:38:10 -04:00
Richard Hansen
d8a9d9d089
Add support for infinite duration
2024-05-25 00:38:10 -04:00
Richard Hansen
9c6e5fdda4
Output a |
character in log message continuation lines
...
This makes it easier to tell where multi-line log messages begin and
end.
2024-05-23 02:04:29 -04:00
Richard Hansen
ff39ce3874
Don't use sprintf
if there is only one argument
...
This avoids problems when logging a string that might have
metacharacters.
2024-05-23 02:04:19 -04:00
Richard Hansen
bcd57b486b
Always log to STDERR, even for debug, info, etc.
...
Rationale:
* Logging to STDERR enables separation of processable output (e.g.,
`--version` or `--help`) and ephemeral status/error messages.
* A single file descriptor for all log messages makes it easier for
users to capture all log messages.
* Consistency: it's what most utilities do.
2024-05-23 02:04:19 -04:00
Richard Hansen
d6693e0175
Use the de facto standard signature separator instead of "regards"
2024-05-23 01:57:12 -04:00
Richard Hansen
065b227711
logmsg: New low-level logging interface
2024-05-23 01:57:12 -04:00
Richard Hansen
f9dafa35a1
Rename $msgs
to $emailbody
to improve readability
2024-05-23 01:54:09 -04:00
Richard Hansen
8ef7b13cb0
Don't set legacy status
in protocols if IPv6-aware
...
ddclient infrastructure will update the legacy `status` variable if
necessary.
2024-05-20 01:35:21 -04:00
Richard Hansen
ba18535c51
Fix broken legacy status
handling
...
`$config{$h}{'status'}` was always initialized to a non-`undef` value,
so the `//` fallbacks never did anything. Instead, any protocol that
does not explicitly update the legacy `status` variable (such as
`godaddy`) would always appear to have failed even if it had
succeeded.
Change the `status*` variables to `undef` by default, and only set
them when an attempt is made so that the legacy `//` fallback works as
expected.
2024-05-20 01:33:15 -04:00
Richard Hansen
f212613526
godaddy: Fix status field name
...
This shouldn't matter in practice because the `status-ipv$ipversion`
field is initialized to a non-`good` value so failing to set it to
`bad` doesn't turn it `good`, but it improves readability.
2024-05-20 01:30:33 -04:00
Richard Hansen
c60aa225a1
godaddy: Rename $status
to $code
2024-05-20 01:30:33 -04:00
Richard Hansen
dc92f16eb2
dnsexit2: Update new status-ipv*
vars, not legacy status
...
The `dnsexit2` protocol reads the IP addresses from the new `ipv4` and
`ipv6` variables, so it should update the `status-ipv4` and
`status-ipv6` variables.
2024-05-20 01:30:33 -04:00
Richard Hansen
baec50d134
1984: Update cached status and IP on success
2024-05-20 01:30:33 -04:00
Richard Hansen
8b0c038d63
1984: Fix missing next
on failure
2024-05-20 01:30:33 -04:00
Richard Hansen
9573051e3e
njalla: Update cached status and IP on success
2024-05-20 01:30:33 -04:00
Richard Hansen
6320e6c395
Don't require login
and password
to be set
...
Not all services use them.
This change should have been included with commit
27b5c535bc
.
2024-05-20 00:13:37 -04:00
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