From c31668b41379a39e7d7f86d9e1c52ce86b7775cd Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 18:08:53 -0400 Subject: [PATCH 1/5] dyndns2: Honor `http:` or `https:` scheme in `server` variable or fall back to the value of the `ssl` variable if no `http:` or `https:` scheme is present. --- ChangeLog.md | 4 ++++ ddclient.in | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 4f4c23e..fe98389 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -62,6 +62,10 @@ repository history](https://github.com/ddclient/ddclient/commits/master). address changes. [#654](https://github.com/ddclient/ddclient/pull/654) * `he.net`: Added support for updating Hurricane Electric records. [#682](https://github.com/ddclient/ddclient/pull/682) + * `dyndns2`: The `server` option can now include `http://` or `https://` to + control the use of TLS. If omitted, the value of the `ssl` option is used + to determine the scheme. + [#703](https://github.com/ddclient/ddclient/pull/703) ### Bug fixes diff --git a/ddclient.in b/ddclient.in index 1d11b79..89f40f7 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4072,8 +4072,7 @@ sub nic_dyndns2_update { info("setting IPv4 address to %s for %s", $ipv4, $hosts) if $ipv4; info("setting IPv6 address to %s for %s", $ipv6, $hosts) if $ipv6; verbose("UPDATE:", "updating %s", $hosts); - ## Select the DynDNS system to update - my $url = "http://$groupcfg{'server'}$groupcfg{'script'}?system="; + my $url = "$groupcfg{'server'}$groupcfg{'script'}?system="; if ($groupcfg{'custom'}) { warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) if $groupcfg{'static'}; From 6fbb7eb3dc55608e38dacf2181e21f85ab9fae19 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 18:10:59 -0400 Subject: [PATCH 2/5] domeneshop: Honor `http:` or `https:` scheme in `server` variable --- ChangeLog.md | 6 +++--- ddclient.in | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index fe98389..cc2e604 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -62,9 +62,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master). address changes. [#654](https://github.com/ddclient/ddclient/pull/654) * `he.net`: Added support for updating Hurricane Electric records. [#682](https://github.com/ddclient/ddclient/pull/682) - * `dyndns2`: The `server` option can now include `http://` or `https://` to - control the use of TLS. If omitted, the value of the `ssl` option is used - to determine the scheme. + * `dyndns2`, `domeneshop`: The `server` option can now include `http://` or + `https://` to control the use of TLS. If omitted, the value of the `ssl` + option is used to determine the scheme. [#703](https://github.com/ddclient/ddclient/pull/703) ### Bug fixes diff --git a/ddclient.in b/ddclient.in index 89f40f7..d2f149b 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4570,16 +4570,9 @@ sub nic_domeneshop_update { my $ip = delete $config{$h}{'wantip'}; info("Setting IP address to %s for %s", $ip, $h); verbose("UPDATE:", "Updating %s", $h); - - # Set the URL that we're going to to update - my $url; - $url = $globals{'ssl'} ? "https://" : "http://"; - $url .= "$config{$h}{'server'}$endpointPath?hostname=$h&myip=$ip"; - - # Try to get URL my $reply = geturl( proxy => opt('proxy'), - url => $url, + url => "$config{$h}{'server'}$endpointPath?hostname=$h&myip=$ip", login => $config{$h}{'login'}, password => $config{$h}{'password'}, ); From 469c5a072e9ee475d33d5acc857d44277ec1df3f Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 18:12:49 -0400 Subject: [PATCH 3/5] dnsmadeeasy: Honor `http:` or `https:` scheme in `server` variable --- ChangeLog.md | 6 +++--- ddclient.in | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index cc2e604..ca430c7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -62,9 +62,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master). address changes. [#654](https://github.com/ddclient/ddclient/pull/654) * `he.net`: Added support for updating Hurricane Electric records. [#682](https://github.com/ddclient/ddclient/pull/682) - * `dyndns2`, `domeneshop`: The `server` option can now include `http://` or - `https://` to control the use of TLS. If omitted, the value of the `ssl` - option is used to determine the scheme. + * `dyndns2`, `domeneshop`, `dnsmadeeasy`: The `server` option can now include + `http://` or `https://` to control the use of TLS. If omitted, the value of + the `ssl` option is used to determine the scheme. [#703](https://github.com/ddclient/ddclient/pull/703) ### Bug fixes diff --git a/ddclient.in b/ddclient.in index d2f149b..3963c0d 100755 --- a/ddclient.in +++ b/ddclient.in @@ -7025,11 +7025,7 @@ sub nic_dnsmadeeasy_update { my $ip = delete $config{$h}{'wantip'}; info("Setting IP address to %s for %s", $ip, $h); verbose("UPDATE:", "Updating %s", $h); - - # Set the URL that we're going to to update - my $url; - $url = $globals{'ssl'} ? "https://" : "http://"; - $url .= $config{$h}{'server'} . $config{$h}{'script'}; + my $url = $config{$h}{'server'} . $config{$h}{'script'}; $url .= "?username=$config{$h}{'login'}"; $url .= "&password=$config{$h}{'password'}"; $url .= "&ip=$ip"; From 0ed297085240d9738d04bc32ac9b0324c3a44347 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 18:13:45 -0400 Subject: [PATCH 4/5] keysystems: Honor `http:` or `https:` scheme in `server` variable or fall back to the value of the `ssl` variable if neither `http:` nor `https:` is present. --- ChangeLog.md | 6 +++--- ddclient.in | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index ca430c7..30deeb5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -62,9 +62,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master). address changes. [#654](https://github.com/ddclient/ddclient/pull/654) * `he.net`: Added support for updating Hurricane Electric records. [#682](https://github.com/ddclient/ddclient/pull/682) - * `dyndns2`, `domeneshop`, `dnsmadeeasy`: The `server` option can now include - `http://` or `https://` to control the use of TLS. If omitted, the value of - the `ssl` option is used to determine the scheme. + * `dyndns2`, `domeneshop`, `dnsmadeeasy`, `keysystems`: The `server` option + can now include `http://` or `https://` to control the use of TLS. If + omitted, the value of the `ssl` option is used to determine the scheme. [#703](https://github.com/ddclient/ddclient/pull/703) ### Bug fixes diff --git a/ddclient.in b/ddclient.in index 3963c0d..1e2cd18 100755 --- a/ddclient.in +++ b/ddclient.in @@ -7654,10 +7654,7 @@ sub nic_keysystems_update { for my $h (@_) { my $ip = delete $config{$h}{'wantip'}; info("KEYSYSTEMS setting IP address to %s for %s", $ip, $h); - - my $url = "http://$config{$h}{'server'}/update.php?hostname=$h&password=$config{$h}{'password'}&ip=$ip"; - - # Try to get URL + my $url = "$config{$h}{'server'}/update.php?hostname=$h&password=$config{$h}{'password'}&ip=$ip"; my $reply = geturl(proxy => opt('proxy'), url => $url) // ''; # No response, declare as failed From 7754c6510343aedaa7537f5c56c28db2c25781a9 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 18:23:01 -0400 Subject: [PATCH 5/5] woima: Honor `http:` or `https:` scheme in `server` variable --- ChangeLog.md | 6 +++--- ddclient.in | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 30deeb5..d60effc 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -62,9 +62,9 @@ repository history](https://github.com/ddclient/ddclient/commits/master). address changes. [#654](https://github.com/ddclient/ddclient/pull/654) * `he.net`: Added support for updating Hurricane Electric records. [#682](https://github.com/ddclient/ddclient/pull/682) - * `dyndns2`, `domeneshop`, `dnsmadeeasy`, `keysystems`: The `server` option - can now include `http://` or `https://` to control the use of TLS. If - omitted, the value of the `ssl` option is used to determine the scheme. + * `dyndns2`, `domeneshop`, `dnsmadeeasy`, `keysystems`, `woima`: The `server` + option can now include `http://` or `https://` to control the use of TLS. + If omitted, the value of the `ssl` option is used to determine the scheme. [#703](https://github.com/ddclient/ddclient/pull/703) ### Bug fixes diff --git a/ddclient.in b/ddclient.in index 1e2cd18..111516a 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1054,7 +1054,12 @@ our %protocols = ( 'custom' => setv(T_BOOL, 0, 1, 0, undef), 'mx' => setv(T_OFQDN, 0, 1, undef, undef), 'script' => setv(T_STRING, 0, 1, '/nic/update', undef), - 'server' => setv(T_FQDNP, 0, 0, 'dyn.woima.fi', undef), + # As of 2024-07-13, dyn.woima.fi does not have a valid TLS certificate so the `http:` + # scheme is explicitly specified here. Once a proper certificate is deployed, or if + # the user overrides certificate validation, the user can manually set the `server` + # option and either change http: to https: or omit the scheme (in which case ddclient + # will use the value of the `ssl` option to determine the scheme). + 'server' => setv(T_FQDNP, 0, 0, 'http://dyn.woima.fi', undef), 'static' => setv(T_BOOL, 0, 1, 0, undef), 'wildcard' => setv(T_BOOL, 0, 1, 0, undef), }, @@ -6802,10 +6807,7 @@ sub nic_woima_update { info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:", "updating %s", $h); - - ## Select the DynDNS system to update - ## TODO: endpoint does not support https with functioning certificate. Remove? - my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; + my $url = "$config{$h}{'server'}$config{$h}{'script'}?system="; if ($config{$h}{'custom'}) { warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $h) if $config{$h}{'static'};