Commit graph

565 commits

Author SHA1 Message Date
Richard Hansen
0c31681d35 porkbun: Simplify array length check 2024-07-27 04:40:34 -04:00
Richard Hansen
16b15ea089 porkbun: Remove headers from HTTP response before processing 2024-07-27 04:40:34 -04:00
Richard Hansen
c65d5c1254 porkbun: Don't bother setting status on failure
It's already initialized to a non-success value.
2024-07-27 04:40:34 -04:00
Richard Hansen
bafd5a8715 porkbun: Inline unnecessary variables 2024-07-27 04:40:34 -04:00
Richard Hansen
45d832145f porkbun: Simplify RR set type 2024-07-27 04:40:34 -04:00
Richard Hansen
038b31cf77 porkbun: Simplify zone removal logic 2024-07-27 04:40:34 -04:00
Richard Hansen
630a2d5d49 porkbun: Move "ipv" out of $ipv for consistency
This also makes it possible to change "ipv4" and "ipv6" in log
messages to "IPv4" and "IPv6".
2024-07-27 04:40:34 -04:00
Richard Hansen
4273580bdf porkbun: Consolidate lines to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
c6bcfd4644 porkbun: Quote interpolated variable in regex 2024-07-27 04:40:34 -04:00
Richard Hansen
1020145fdf porkbun: Rename variables for brevity and consistency 2024-07-27 04:40:34 -04:00
Richard Hansen
3f740c3e19 porkbun: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
4b5b8ab62d porkbun: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
3dae16457a dnsmadeeasy: Consolidate lines for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
2eb0398cf2 dnsmadeeasy: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
b07aa91ed5 dnsmadeeasy: Don't bother setting status on failure
It's already initialized to a non-success value.
2024-07-27 04:40:34 -04:00
Richard Hansen
971fe438a3 dnsmadeeasy: Convert string literal to compiled regex
for readability.
2024-07-27 04:40:34 -04:00
Richard Hansen
ca28694dd7 dnsmadeeasy: Don't assume the result code is known 2024-07-27 04:40:34 -04:00
Richard Hansen
11876498d5 dnsmadeeasy: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
c79d12263e dnsmadeeasy: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
07800a4586 dnsmadeeasy: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
f42583c0cf dondominio: Quote interpolated variable in regex 2024-07-27 04:40:34 -04:00
Richard Hansen
6ac5b41a20 dondominio: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
d79ef268bd dondominio: Combine regular expressions to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
8b58f7bd99 dondominio: Don't bother setting status on error
It's already initialized to a non-success value.
2024-07-27 04:40:34 -04:00
Richard Hansen
2823e47c58 dondominio: The IP address is always provided 2024-07-27 04:40:34 -04:00
Richard Hansen
fe502abcd8 dondominio: Consolidate lines for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
7a43920b99 dondominio: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
17a002cbd6 dondominio: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
e155e1bf2c dondominio: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
d62495c41e ddns.fm: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
1195a40c45 freemyip: Check entire result body, not just first line
This is simpler, and should be more resilient to bugs.
2024-07-27 04:40:34 -04:00
Richard Hansen
3ece2017e9 freemyip: Skip headers before processing response
This isn't strictly necessary but improves readability and
consistency.
2024-07-27 04:40:34 -04:00
Richard Hansen
a252ff5ebe freemyip: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
9343ebec89 freemyip: Don't bother setting status on error
It's not necessary because it's already initialized to a non-success
value.
2024-07-27 04:40:34 -04:00
Richard Hansen
c53f40d205 freemyip: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
b3006dd6c6 freemyip: Consolidate lines for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
62154f9869 freemyip: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
f8bdc48e42 freemyip: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
7bdb554e36 duckdns: Update multiple hosts simultaneously 2024-07-27 04:40:34 -04:00
Richard Hansen
1eccfb8c77 duckdns: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
91fd9e3842 duckdns: Simplify response processing 2024-07-27 04:40:34 -04:00
Richard Hansen
971e88452d duckdns: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
8a334fd9cf duckdns: Consolidate lines to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
98ed129b20 duckdns: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
b80fe1b505 duckdns: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
459970c5e3 yandex: Check for presence of success, not lack of error
This is more resilient to bugs.
2024-07-27 04:40:34 -04:00
Richard Hansen
f807ba58ac yandex: Don't treat an error as success 2024-07-27 04:40:34 -04:00
Richard Hansen
58c6caa5ff nfsn: Include host in failure message 2024-07-27 04:40:34 -04:00
Richard Hansen
ef8bf634fe domeneshop: Add IPv6 support 2024-07-27 04:40:34 -04:00
Richard Hansen
61fff1c344 domeneshop: Inline an unnecessary variable 2024-07-27 04:40:34 -04:00
Richard Hansen
d391f41074 domeneshop: Treat all 2xx as success 2024-07-27 04:40:34 -04:00
Richard Hansen
b4e08ae3ae domeneshop: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
231601ae54 domeneshop: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
f0edd7f781 domeneshop: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
2534375cfd dyndns1: Move else case up a level for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
02c80fdf09 dslreports1: Move out else case to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
95a10e2595 dslreports1: Log message improvements 2024-07-27 04:40:34 -04:00
Richard Hansen
2d60183e93 noip: Log message improvements 2024-07-27 04:40:34 -04:00
Richard Hansen
c0b28f344f noip: Simplify response processing 2024-07-27 04:40:34 -04:00
Richard Hansen
5b433c3cd5 noip: Delete redundant response check 2024-07-27 04:40:34 -04:00
Richard Hansen
27143db56e dnsexit2: Pass an arrayref of headers for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
1c94ed6063 dnsexit2: Check for JSON object, not just truthiness 2024-07-27 04:40:34 -04:00
Richard Hansen
4a394f4562 dnsexit2: Delete rogue semicolon 2024-07-27 04:40:34 -04:00
Richard Hansen
56f0d931a4 dnsexit2: Delete redundant check
`header_ok` already checks whether the response is `undef`.
2024-07-27 04:40:34 -04:00
Richard Hansen
e5b00216ec dnsexit2: Log message improvements 2024-07-27 04:40:34 -04:00
Richard Hansen
073fe5a51d dnsexit2: Delete redundant HTTP status code check
`header_ok` already checks for non-2xx codes.
2024-07-27 04:40:34 -04:00
Richard Hansen
3d894364bf dnsexit2: Delete redundant debug message
`geturl` already debug logs the response.
2024-07-27 04:40:34 -04:00
Richard Hansen
2ac61250e5 dnsexit2: Fix compatibility with old versions of Perl
The non-destructive substitution modifier wasn't added until Perl
v5.14.0.
2024-07-27 04:40:34 -04:00
Richard Hansen
962abfbbc3 use=web, use=<fw>: Don't treat non-2xx results as successes 2024-07-27 04:40:34 -04:00
Richard Hansen
e272caa385 use=web, use=<fw>: Strip HTTP headers before searching for IP 2024-07-27 04:40:34 -04:00
Richard Hansen
08626482c3 header_ok: Don't assume that it is only used for host updates 2024-07-27 03:59:52 -04:00
Richard Hansen
d48b482269 geturl: Log message improvements 2024-07-27 03:59:52 -04:00
Richard Hansen
b1752c2622 logging: Delete unused msg function 2024-07-27 03:59:29 -04:00
Richard Hansen
6aa68f72a7 logging: Change multi-line log message designation style
Before, the first line of a multi-line log message was prefixed with a
space while all subsequent messages were prefixed with `|`.  Now the
first line is prefixed with `>` and all subsequent lines with a space.
This makes it easier to quickly discern message boundaries.
2024-07-27 03:47:47 -04:00
Richard Hansen
bd437a0abf nic_updateable: Log message improvements 2024-07-26 23:58:20 -04:00
Richard Hansen
8262f112ea nic_updateable: Read option value after loading config 2024-07-26 23:58:20 -04:00
Richard Hansen
1ad9b565bd nic_updateable: Don't warn about success
Why issue a warning that things have suddenly started going well?
It's bizarre.
2024-07-26 23:58:20 -04:00
Richard Hansen
1054e162fa query_cisco: Use host-specific option value 2024-07-26 23:50:14 -04:00
Richard Hansen
0392c5e725 query_cisco: Delete redundant warning
The same message is already logged in `get_ipv4`.
2024-07-26 23:50:14 -04:00
Richard Hansen
e891f53345 update_nics: Consistently use --opt instead of opt 2024-07-26 23:50:04 -04:00
Richard Hansen
5d68b11d78 get_ipv6: Factor out check for deprecated value 2024-07-26 23:50:04 -04:00
Richard Hansen
2530adb39e get_ip: Log message improvements 2024-07-26 23:50:04 -04:00
Richard Hansen
b9d372c12d get_ip: Allow $arg to be undefined
This is simpler, and makes it possible to distinguish unset from set
to an empty string.
2024-07-26 23:49:48 -04:00
Richard Hansen
0ea2f06513 get_ip: Don't mutate $arg
This makes log messages easier to understand.
2024-07-26 19:05:47 -04:00
Richard Hansen
ccc205301a Delete old test code
It's better to start a test HTTP server or override `@curl` from tests
in `t/*.pl`.
2024-07-26 19:05:47 -04:00
Richard Hansen
6ddecb4ecc Replace use vars with our
From the documentation for `vars`:

> NOTE: For use with variables in the current package for a single
> scope, the functionality provided by this pragma has been superseded
> by "our" declarations, available in Perl v5.6.0 or later, and use of
> this pragma is discouraged.
2024-07-26 19:05:47 -04:00
Richard Hansen
89d7193f69 nic_updateable: Simplify option changed detection logic 2024-07-26 18:15:21 -04:00
Richard Hansen
38a4e9eeef nic_updateable: Remove unnecessary force_update parameter
`nic_updateable` can look up the host's `force_update` function itself
so there's no need to pass it as an argument.
2024-07-26 17:24:49 -04:00
Richard Hansen
0ffffb1400 Delete unnecessary force_update => undef lines 2024-07-26 17:21:11 -04:00
Richard Hansen
5a8bee1e4d Delete unnecessary nic_dyndns2_force_update
The `nic_updateable` function already checks the variables to see if
they have changed, so this function is redundant.
2024-07-26 17:06:09 -04:00
Richard Hansen
2a9abc9d4c Delete unused nic_easydns_force_update function 2024-07-26 17:04:12 -04:00
jameskimmel
bcfdf70c34
delete unused zoneedit force update
I think this sub is never used.
2024-07-23 18:53:27 +02:00
Richard Hansen
9996c1b7d4 googledomains: Remove support for defunct service 2024-07-22 23:28:33 -04:00
Richard Hansen
ddfa8663ad woima: Remove support for defunct service 2024-07-22 23:26:41 -04:00
Richard Hansen
3c68abe551 easydns: Fix incorrect status value on success 2024-07-20 03:44:05 -04:00
Richard Hansen
a7feb95091 easydns: Add missing OK and NO_AUTH result codes 2024-07-20 03:44:05 -04:00
Richard Hansen
d8c74169ee easydns: Include the full ILLEGAL INPUT result code in log messages 2024-07-20 03:44:05 -04:00
Richard Hansen
a724084114 easydns: Fix extraction of result code from response body
The server returns a full HTML document, not just the result code.
Change equality check to a regex match that is resilient to
server-side changes.
2024-07-20 03:44:05 -04:00
Richard Hansen
435357ac50 easydns: Invert condition to improve readability 2024-07-20 03:44:04 -04:00
Richard Hansen
da26fe76e0 easydns: Update IPv4 and IPv6 separately
https://kb.easydns.com/knowledge/dynamic-dns/ doesn't say anything
about repeating the `myip` parameter, or that both IPv4 and IPv6
addresses can be included in the same `myip` parameter.

Unfortunately it also doesn't say whether updating the IPv4 address
alone will nuke the IPv6 AAAA record, or whether updating the IPv6
address alone will nuke the IPv4 A record (like Google Domains used to
do).  Here's hoping that the A and AAAA records are truly independent.
2024-07-20 03:44:04 -04:00