Add support for DNS Made Easy (https://dnsmadeeasy.com)
UPDATE: Updating 77282436 DEBUG: proxy = DEBUG: url = https://cp.dnsmadeeasy.com/servlet/updateip?username=xxx@xxx.org&password=xxxxxx&ip=192.168.43.239&id=77282436 DEBUG: server = cp.dnsmadeeasy.com CONNECT: cp.dnsmadeeasy.com CONNECTED: using SSL SENDING: GET /servlet/updateip?username=xxx@xxx.org&password=xxxxxxx&ip=192.168.43.239&id=77282436 HTTP/1.0 SENDING: Host: cp.dnsmadeeasy.com SENDING: User-Agent: ddclient/3.9.0 SENDING: Connection: close SENDING: SENDING: RECEIVE: HTTP/1.1 200 OK RECEIVE: Server: Apache-Coyote/1.1 RECEIVE: Pragma: No-cache RECEIVE: Cache-Control: no-cache RECEIVE: Expires: Thu, 01 Jan 1970 00:00:00 UTC RECEIVE: x-dnsme-requestId: 496b9516-44da-48fc-b750-256f191848f5 RECEIVE: Set-Cookie: JSESSIONID=17103D9DF72BB33118DD2177BD8813A0; Path=/; Secure; HttpOnly RECEIVE: Content-Type: text/plain RECEIVE: Date: Thu, 18 Oct 2018 11:41:45 GMT RECEIVE: Connection: close RECEIVE: RECEIVE: success SUCCESS: Updating 77282436: good: IP address set to 192.168.43.239
This commit is contained in:
parent
02c983a991
commit
2f7e8ee236
4 changed files with 131 additions and 20 deletions
41
README.md
41
README.md
|
@ -8,26 +8,27 @@ on many dynamic DNS services.
|
|||
|
||||
Dynamic DNS services currently supported include:
|
||||
|
||||
DynDNS.com - See http://www.dyndns.com for details on obtaining a free account.
|
||||
Hammernode - See http://www.hn.org for details on obtaining a free account.
|
||||
Zoneedit - See http://www.zoneedit.com for details.
|
||||
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
|
||||
Noip - See http://www.noip.com/ for details
|
||||
Freedns - See http://freedns.afraid.org/ for details
|
||||
ChangeIP - See http://www.changeip.com/ for details
|
||||
dtdns - See http://www.dtdns.com/ for details
|
||||
nsupdate - See nsupdate(1) and ddns-confgen(8) for details
|
||||
CloudFlare - See https://www.cloudflare.com/ for details
|
||||
Google - See http://www.google.com/domains for details
|
||||
Duckdns - See https://duckdns.org/ for details
|
||||
Freemyip - See https://freemyip.com for details
|
||||
woima.fi - See https://woima.fi/ for details
|
||||
DynDNS.com - See http://www.dyndns.com for details on obtaining a free account.
|
||||
Hammernode - See http://www.hn.org for details on obtaining a free account.
|
||||
Zoneedit - See http://www.zoneedit.com for details.
|
||||
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
|
||||
Noip - See http://www.noip.com/ for details
|
||||
Freedns - See http://freedns.afraid.org/ for details
|
||||
ChangeIP - See http://www.changeip.com/ for details
|
||||
dtdns - See http://www.dtdns.com/ for details
|
||||
nsupdate - See nsupdate(1) and ddns-confgen(8) for details
|
||||
CloudFlare - See https://www.cloudflare.com/ for details
|
||||
Google - See http://www.google.com/domains for details
|
||||
Duckdns - See https://duckdns.org/ for details
|
||||
Freemyip - See https://freemyip.com for details
|
||||
woima.fi - See https://woima.fi/ for details
|
||||
DNS Made Easy - See https://dnsmadeeasy.com/ for details
|
||||
|
||||
DDclient now supports many of cable/dsl broadband routers.
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@ On alpine, you need perl-io-socket-ssl to have IO::Socket::SSL
|
|||
ssl support is tested on folowing dynamic dns providers:
|
||||
- dyndns.com
|
||||
- freemyip.com
|
||||
- DNS Made Easy
|
||||
|
|
100
ddclient
100
ddclient
|
@ -483,6 +483,10 @@ my %variables = (
|
|||
'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef),
|
||||
'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef),
|
||||
},
|
||||
'dnsmadeeasy-common-defaults' => {
|
||||
'server' => setv(T_FQDNP, 1, 0, 1, 'cp.dnsmadeeasy.com', undef),
|
||||
'script' => setv(T_STRING, 1, 1, 1, '/servlet/updateip', undef),
|
||||
},
|
||||
);
|
||||
my %services = (
|
||||
'dyndns1' => {
|
||||
|
@ -685,6 +689,15 @@ my %services = (
|
|||
$variables{'woima-service-common-defaults'},
|
||||
),
|
||||
},
|
||||
'dnsmadeeasy' => {
|
||||
'updateable' => undef,
|
||||
'update' => \&nic_dnsmadeeasy_update,
|
||||
'examples' => \&nic_dnsmadeeasy_examples,
|
||||
'variables' => merge(
|
||||
$variables{'dnsmadeeasy-common-defaults'},
|
||||
$variables{'service-common-defaults'},
|
||||
),
|
||||
},
|
||||
);
|
||||
$variables{'merged'} = merge($variables{'global-defaults'},
|
||||
$variables{'service-common-defaults'},
|
||||
|
@ -4676,6 +4689,93 @@ sub nic_woima_update {
|
|||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
## nic_dnsmadeeasy_examples
|
||||
######################################################################
|
||||
sub nic_dnsmadeeasy_examples {
|
||||
return <<EoEXAMPLE;
|
||||
o 'dnsmadeeasy'
|
||||
|
||||
The 'dnsmadeeasy' protocol is used by the DNS Made Easy service at https://www.dnsmadeeasy.com.
|
||||
API is documented here: https://dnsmadeeasy.com/technology/dynamic-dns/
|
||||
|
||||
Configuration variables applicable to the 'dnsmadeeasy' protocol are:
|
||||
protocol=dnsmadeeasy ##
|
||||
login=email-address ## Email address used to log in to your account.
|
||||
password=dynamic-record-password ## Generated password for your dynamic DNS record.
|
||||
record-id-1,record-id-2,... ## Numeric dynamic DNS record IDs, comma-separated if updating multiple.
|
||||
|
||||
Note: Dynamic record ID is generated when you create a new Dynamic DNS record in the DNS Made Easy control panel.
|
||||
|
||||
Example ${program}.conf file entries:
|
||||
## single host update
|
||||
protocol=dnsmadeeasy, \\
|
||||
username=dme\@example.com, \\
|
||||
password=myg3nerat3dp4ssword, \\
|
||||
1007,1008
|
||||
|
||||
EoEXAMPLE
|
||||
}
|
||||
|
||||
######################################################################
|
||||
## nic_dnsmadeeasy_update
|
||||
######################################################################
|
||||
sub nic_dnsmadeeasy_update {
|
||||
debug("\nnic_dnsmadeeasy_update -------------------");
|
||||
|
||||
my %messages = (
|
||||
'error-auth' => 'Invalid username or password, or invalid IP syntax',
|
||||
'error-auth-suspend' => 'User has had their account suspended due to complaints or misuse of the service.',
|
||||
'error-auth-voided' => 'User has had their account permanently revoked.',
|
||||
'error-record-invalid' =>'Record ID number does not exist in the system.',
|
||||
'error-record-auth' => 'User does not have access to this record.',
|
||||
'error-record-ip-same' => 'No update required.',
|
||||
'error-system' => 'General system error which is caught and recognized by the system.',
|
||||
'error' => 'General system error unrecognized by the system.',
|
||||
'success' => 'Record successfully updated!',
|
||||
);
|
||||
|
||||
foreach my $h (@_) {
|
||||
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'};
|
||||
$url .= "?username=$config{$h}{'login'}";
|
||||
$url .= "&password=$config{$h}{'password'}";
|
||||
$url .= "&ip=$ip";
|
||||
$url .= "&id=$h";
|
||||
|
||||
# Try to get URL
|
||||
my $reply = geturl(opt('proxy'), $url);
|
||||
|
||||
# No response, declare as failed
|
||||
if (!defined($reply) || !$reply) {
|
||||
failed("Updating %s: Could not connect to %s.", $h, $config{$h}{'server'});
|
||||
last;
|
||||
}
|
||||
last if !header_ok($h, $reply);
|
||||
|
||||
my @reply = split /\n/, $reply;
|
||||
my $returned = pop(@reply);
|
||||
if ($returned =~ '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: '$returned': $messages{$returned}", $h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
######################################################################
|
||||
# vim: ai ts=4 sw=4 tw=78 :
|
||||
|
|
|
@ -240,3 +240,12 @@ ssl=yes # use ssl-support. Works with
|
|||
# login=your-myonlineportal-username
|
||||
# password=your-myonlineportal-password
|
||||
# domain.myonlineportal.net
|
||||
|
||||
##
|
||||
## DNS Made Easy (https://dnsmadeeasy.com)
|
||||
##
|
||||
#
|
||||
# protocol=dnsmadeeasy,
|
||||
# login=your-account-email-address
|
||||
# password=your-generated-password
|
||||
# your-numeric-record-id-1,your-numeric-record-id-2,...
|
||||
|
|
Loading…
Reference in a new issue