diff --git a/README.md b/README.md index 95c1f32..db628f0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Dynamic DNS services currently supported include: EasyDNS - See http://www.easydns.com for details. NameCheap - See http://www.namecheap.com for details ConCont - See http://www.dydns.za.net for details - DnsPark - See http://www.dnspark.com for details DslReports - See http://www.dslreports.com for details Sitelutions - See http://www.sitelutions.com for details Loopia - See http://www.loopia.se for details diff --git a/ddclient b/ddclient index c5e92dd..e8a9aae 100755 --- a/ddclient +++ b/ddclient @@ -68,7 +68,6 @@ sub T_POSTS {'postscript'}; my %builtinweb = ( 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address:', }, - 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current IP Address:', }, ); my %builtinfw = ( @@ -304,7 +303,6 @@ sub ip_strategies_usage { my %web_strategies = ( 'dyndns'=> 1, - 'dnspark'=> 1, 'loopia'=> 1, ); @@ -405,10 +403,6 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), }, - 'dnspark-common-defaults' => { - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), - }, 'noip-common-defaults' => { 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), }, @@ -578,17 +572,6 @@ my %services = ( $variables{'service-common-defaults'}, ), }, - 'dnspark' => { - 'updateable' => undef, - 'update' => \&nic_dnspark_update, - 'examples' => \&nic_dnspark_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, - $variables{'dnspark-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, 'namecheap' => { 'updateable' => undef, 'update' => \&nic_namecheap_update, @@ -3516,166 +3499,6 @@ sub nic_easydns_update { } ###################################################################### -###################################################################### -## nic_dnspark_updateable -###################################################################### -sub nic_dnspark_updateable { - my $host = shift; - my $update = 0; - - if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { - info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); - $update = 1; - - } elsif ($config{$host}{'mx'} && ($config{$host}{'mxpri'} ne $cache{$host}{'mxpri'})) { - info("forcing updating %s because 'mxpri' has changed to %s.", $host, $config{$host}{'mxpri'}); - $update = 1; - } - return $update; -} -###################################################################### -## nic_dnspark_examples -###################################################################### -sub nic_dnspark_examples { - return < [ $_ ] } @_; - - my %errors = ( - 'nochange' => 'No changes made to the hostname(s). Continual updates with no changes lead to blocked clients.', - 'nofqdn' => 'No valid FQDN (fully qualified domain name) was specified', - 'nohost'=> 'An invalid hostname was specified. This due to the fact the hostname has not been created in the system. Creating new host names via clients is not supported.', - 'abuse' => 'The hostname specified has been blocked for abuse.', - 'unauth' => 'The username specified is not authorized to update this hostname and domain.', - 'blocked' => 'The dynamic update client (specified by the user-agent) has been blocked from the system.', - 'notdyn' => 'The hostname specified has not been marked as a dynamic host. Hosts must be marked as dynamic in the system in order to be updated via clients. This prevents unwanted or accidental updates.', - ); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - my $ip = $config{$h}{'wantip'}; - delete $config{$_}{'wantip'} foreach @hosts; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - #'http://www.dnspark.com:80/visitors/update.html?myip=10.20.30.40&hostname=test.burry.ca' - - my $url; - $url = "http://$config{$h}{'server'}/visitors/update.html"; - $url .= "?hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; - - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; - $url .= "&mxpri=" . $config{$h}{'mxpri'}; - } - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - my $state = 'header'; - foreach my $line (@reply) { - if ($state eq 'header') { - $state = 'body'; - - } elsif ($state eq 'body') { - $state = 'results' if $line eq ''; - - } elsif ($state =~ /^results/) { - $state = 'results2'; - - my ($status) = $line =~ /^(\S*)\b.*/; - my $h = pop @hosts; - - $config{$h}{'status'} = $status; - if ($status eq 'ok') { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - success("updating %s: %s: IP address set to %s", $h, $status, $ip); - - } elsif ($status =~ /TOOSOON/) { - ## make sure we wait at least a little - my ($wait, $units) = (5, 'm'); - my ($sec, $scale) = ($wait, 1); - - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - $config{$h}{'wtime'} = $now + $sec; - warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); - - } elsif (exists $errors{$status}) { - failed("updating %s: %s: %s", $h, $line, $errors{$status}); - - } else { - failed("updating %s: %s: unexpected status (%s)", $h, $line); - } - last; - } - } - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) - if $state ne 'results2'; - } -} - -###################################################################### - ###################################################################### ## nic_namecheap_examples ###################################################################### diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index f11da29..72b48f0 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -145,15 +145,6 @@ ssl=yes # use ssl-support. Works with # password=yourPassword \ # yourSubdomain.orgdns.org -## -## dnspark.com -## (supports variables: mx, mxpri) -## -# use=web, web=ipdetect.dnspark.com, web-skip='Current Address:' -# protocol=dnspark, \ -# server=www.dnspark.com, \ -# your-host.dnspark.com - ## ## NameCheap (namecheap.com) ##