diff --git a/README.md b/README.md index b86586d..2f97385 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DDCLIENT v3.10.0 +# DDCLIENT `ddclient` is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. @@ -35,6 +35,7 @@ Dynamic DNS services currently supported include: dnsexit - See https://dnsexit.com/ for details 1984.is - See https://www.1984.is/product/freedns/ for details Njal.la - See https://njal.la/docs/ddns/ + regfish.de - See https://www.regfish.de/domains/dyndns/ for details cdmon.org - See https://ticket.cdmon.com/ca/support/solutions/articles/7000005922-api-d-actualitzaci%C3%B3-de-ip-del-dns-gratis-din%C3%A0mic `ddclient` now supports many cable and DSL broadband routers. @@ -79,8 +80,8 @@ ddclient package. the directory: ```shell - tar xvfa ddclient-3.10.0.tar.gz - cd ddclient-3.10.0 + tar xvfa ddclient-3.XX.X.tar.gz + cd ddclient-3.XX.X ``` (If you are installing from a clone of the Git repository, you diff --git a/configure.ac b/configure.ac index 554ea6b..6c58b8f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.63]) -AC_INIT([ddclient], [3.10.0_2]) +AC_INIT([ddclient], [3.10.1]) AC_CONFIG_SRCDIR([ddclient.in]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/ddclient.conf.in b/ddclient.conf.in index 2b231e5..6dca259 100644 --- a/ddclient.conf.in +++ b/ddclient.conf.in @@ -316,6 +316,13 @@ ssl=yes # use ssl-support. Works with # quietreply=no|yes # my-domain.com +## +## regfish.de (www.regfish.de/) +## +# protocol=regfishde, +# password=mypassword +# my-domain.com + ## ## cdmon.org (https://dinamico.cdmon.org/) ## diff --git a/ddclient.in b/ddclient.in index a241b8e..c015ad2 100755 --- a/ddclient.in +++ b/ddclient.in @@ -30,8 +30,8 @@ use IO::Socket::INET; use Socket qw(AF_INET AF_INET6 PF_INET PF_INET6); use Sys::Hostname; -use version 0.77; our $VERSION = version->declare('v3.10.0'); -(my $version = $VERSION->stringify()) =~ s/^v//; +use version 0.77; our $VERSION = version->declare('@PACKAGE_VERSION@'); +my $version = $VERSION->stringify(); my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; @@ -116,8 +116,8 @@ my %builtinweb = ( 'myonlineportal' => {'url' => 'https://myonlineportal.net/checkip'}, 'noip-ipv4' => {'url' => 'http://ip1.dynupdate.no-ip.com/'}, 'noip-ipv6' => {'url' => 'http://ip1.dynupdate6.no-ip.com/'}, - 'nsupdate.info-ipv4' => {'url' => 'http://ipv4.nsupdate.info/myip'}, - 'nsupdate.info-ipv6' => {'url' => 'http://ipv6.nsupdate.info/myip'}, + 'nsupdate.info-ipv4' => {'url' => 'https://ipv4.nsupdate.info/myip'}, + 'nsupdate.info-ipv6' => {'url' => 'https://ipv6.nsupdate.info/myip'}, 'zoneedit' => {'url' => 'https://dynamic.zoneedit.com/checkip.html'}, ); my %builtinfw = ( @@ -533,6 +533,10 @@ my %variables = ( 'script' => setv(T_STRING, 0, 1, '/RemoteUpdate.sv', undef), 'min-error-interval' => setv(T_DELAY, 0, 0, interval('8m'), 0), }, + 'regfishde-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 'dyndns.regfish.de', undef), + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), + }, ); my %services = ( '1984' => { @@ -905,6 +909,15 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'regfishde' => { + 'updateable' => undef, + 'update' => \&nic_regfishde_update, + 'examples' => \&nic_regfishde_examples, + 'variables' => merge( + $variables{'regfishde-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = { map({ %{$services{$_}{'variables'}} } keys(%services)), @@ -4273,8 +4286,8 @@ sub nic_noip_update { 'badagent' => 'Invalid user agent', 'nohost' => 'The hostname specified does not exist in the database', '!donator' => 'The offline setting was set, when the user is not a donator', - 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', - 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', + 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at https://www.no-ip.com', + 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at https://www.no-ip.com', 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', ); @@ -4290,10 +4303,7 @@ sub nic_noip_update { info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:", "updating %s", $hosts); - my $url = "https://$config{$h}{'server'}/nic/update?system="; - $url .= 'noip'; - $url .= "&hostname=$hosts"; - $url .= "&myip="; + my $url = "https://$config{$h}{'server'}/nic/update?system=noip&hostname=$hosts&myip="; $url .= $ip if $ip; my $reply = geturl( @@ -6273,7 +6283,7 @@ sub nic_hetzner_update { $config{$domain}{"status-ipv$ipv"} = 'failed'; # Get DNS 'A' or 'AAAA' record ID - $url = "https://$config{$key}{'server'}/records?$zone_id"; + $url = "https://$config{$key}{'server'}/records"; $reply = geturl(proxy => opt('proxy'), url => $url, headers => $headers @@ -6290,7 +6300,7 @@ sub nic_hetzner_update { next; } # Pull the ID out of the json, messy - my ($dns_rec_id) = map { ($_->{name} eq $hostname && $_->{type} eq $type) ? $_->{id} : ()} @{$response->{records}}; + my ($dns_rec_id) = map { ($_->{name} eq $hostname && $_->{type} eq $type && &zone_id eq $_{zone_id}) ? $_->{id} : ()} @{$response->{records}}; # Set domain my $http_method=""; @@ -6558,7 +6568,7 @@ EoEXAMPLE ###################################################################### ## nic_freemyip_update ## by Cadence (reused code from nic_duckdns) -## http://freemyip.com/update?token=ec54b4b64db27fe8873c7f7&domain=myhost +## https://freemyip.com/update?token=ec54b4b64db27fe8873c7f7&domain=myhost ## response contains OK or ERROR ###################################################################### sub nic_freemyip_update { @@ -7318,6 +7328,67 @@ sub nic_keysystems_update { } } +###################################################################### +## nic_regfishde_examples +###################################################################### +sub nic_regfishde_examples { + return < opt('proxy'), url => $url); + + # No response, give error + if (!defined($reply) || !$reply) { + failed("regfish.de updating %s: failed: %s.", $h, $config{$h}{'server'}); + last; + } + last if !header_ok($h, $reply); + + if ($reply =~ /success/) + { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } + else + { + $config{$h}{'status'} = 'failed'; + failed("updating %s: Server said: '$reply'", $h); + } + } +} # Execute main() if this file is run as a script or run via PAR (https://metacpan.org/pod/PAR), # otherwise do nothing. This "modulino" pattern makes it possible to import this file as a module