Added OVH DynHost support
This commit is contained in:
parent
3e872e890e
commit
d71beb0f7f
4 changed files with 122 additions and 25 deletions
51
README.md
51
README.md
|
|
@ -8,32 +8,33 @@ 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
|
||||
Yandex - See https://domain.yandex.com/ for details
|
||||
DNS Made Easy - See https://dnsmadeeasy.com/ for details
|
||||
DonDominio - See https://www.dondominio.com 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
|
||||
Yandex - See https://domain.yandex.com/ for details
|
||||
DNS Made Easy - See https://dnsmadeeasy.com/ for details
|
||||
DonDominio - See https://www.dondominio.com for details
|
||||
NearlyFreeSpeech.net - See https://www.nearlyfreespeech.net/services/dns for details
|
||||
MyDNS.JP - See https://www.mydns.jp/ for details
|
||||
dnsexit - See https://dnsexit.com/ for details
|
||||
MyDNS.JP - See https://www.mydns.jp/ for details
|
||||
dnsexit - See https://dnsexit.com/ for details
|
||||
OVH - See https://www.ovh.com for details
|
||||
|
||||
DDclient now supports many of cable/dsl broadband routers.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ A detailed overview can be found in ChangeLog but here's a quick overview:
|
|||
* adding configurable TTL to Cloudflare
|
||||
* added support for woima.fi dyndns service
|
||||
* added support for google domain
|
||||
* added support for OVH DynHost
|
||||
|
||||
A very big thank you for everyone who created a pull request on github and
|
||||
for everyone who helped to fix the little issues caused by the new providers.
|
||||
|
|
|
|||
86
ddclient
86
ddclient
|
|
@ -533,6 +533,12 @@ my %variables = (
|
|||
'server' => setv(T_FQDNP, 0, 1, 1, 'update.dnsexit.com', undef),
|
||||
'script' => setv(T_STRING, 0, 1, 1, '/RemoteUpdate.sv', undef),
|
||||
},
|
||||
'ovh-common-defaults' => {
|
||||
'server' => setv(T_FQDNP, 1, 0, 1, 'www.ovh.com', undef),
|
||||
'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef),
|
||||
'login' => setv(T_LOGIN, 1, 0, 1, '', undef),
|
||||
'password' => setv(T_PASSWD, 1, 0, 1, '', undef),
|
||||
},
|
||||
);
|
||||
my %services = (
|
||||
'dyndns1' => {
|
||||
|
|
@ -793,6 +799,15 @@ my %services = (
|
|||
$variables{'service-common-defaults'},
|
||||
),
|
||||
},
|
||||
'ovh' => {
|
||||
'updateable' => undef,
|
||||
'update' => \&nic_ovh_update,
|
||||
'examples' => \&nic_ovh_examples,
|
||||
'variables' => merge(
|
||||
$variables{'ovh-common-defaults'},
|
||||
$variables{'service-common-defaults'},
|
||||
),
|
||||
},
|
||||
);
|
||||
$variables{'merged'} = merge($variables{'global-defaults'},
|
||||
$variables{'service-common-defaults'},
|
||||
|
|
@ -5772,6 +5787,77 @@ sub nic_dnsexit_update {
|
|||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
## nic_ovh_examples
|
||||
######################################################################
|
||||
sub nic_ovh_examples {
|
||||
return <<EoEXAMPLE;
|
||||
o 'ovh'
|
||||
The 'ovh' protocol is used by DNS services offered by www.ovh.com.
|
||||
API information and user instructions available at: https://docs.ovh.com/gb/en/domains/hosting_dynhost/
|
||||
Configuration variables applicable to the 'ovh' protocol are:
|
||||
protocol=ovh ##
|
||||
login=dnsdomain-userid ## The username/id registered with the service
|
||||
password=userid-password ## The password related to the username/id
|
||||
fully.qualified.host ## the hostiname registered with the service.
|
||||
Example ${program}.conf file entries:
|
||||
## single host update
|
||||
protocol=ovh, \\
|
||||
login=example.com-dynhostuser, \\
|
||||
password=s3cuRePaSsw0rd \\
|
||||
test.example.com
|
||||
EoEXAMPLE
|
||||
}
|
||||
|
||||
######################################################################
|
||||
## nic_ovh_examples
|
||||
######################################################################
|
||||
|
||||
sub nic_ovh_update {
|
||||
debug("\nnic_ovh_update -------------------");
|
||||
|
||||
## update each configured host
|
||||
## should improve to update in one pass
|
||||
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 update
|
||||
my $url;
|
||||
$url = "https://";
|
||||
$url .= "$config{$h}{'server'}$config{$h}{'script'}";
|
||||
$url .= "?system=dyndns";
|
||||
$url .= "&hostname=";
|
||||
$url .= $h;
|
||||
$url .= "&myip=";
|
||||
$url .= $ip if $ip;
|
||||
|
||||
my $reply = geturl(opt('proxy'), $url, "$config{$h}{'login'}", "$config{$h}{'password'}");
|
||||
|
||||
if (!defined($reply) || !$reply) {
|
||||
failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'});
|
||||
next;
|
||||
}
|
||||
|
||||
my @reply = split /\n/, $reply;
|
||||
my $returned = pop(@reply);
|
||||
if ($returned =~ /good/ || $returned =~ /nochg/) {
|
||||
$config{$h}{'ip'} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{'status'} = 'good';
|
||||
if ($returned =~ /good/) {
|
||||
success("updating %s: good: IP address set to %s", $h, $ip);
|
||||
} else {
|
||||
success("updating %s: skipped: IP address was already set to %s.", $h, $ip);
|
||||
}
|
||||
} else {
|
||||
$config{$h}{'status'} = 'failed';
|
||||
failed("updating %s: Server said: '$returned'", $h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# vim: ai ts=4 sw=4 tw=78 :
|
||||
|
||||
|
|
|
|||
|
|
@ -288,6 +288,7 @@ ssl=yes # use ssl-support. Works with
|
|||
# password=yandex-pdd-token \
|
||||
# my.domain.tld,other.domain.tld \
|
||||
|
||||
##
|
||||
## DNS Made Easy (https://dnsmadeeasy.com)
|
||||
##
|
||||
# protocol=dnsmadeeasy,
|
||||
|
|
@ -310,3 +311,11 @@ ssl=yes # use ssl-support. Works with
|
|||
#login=myusername
|
||||
#password=mypassword
|
||||
#subdomain-1.domain.com,subdomain-2.domain.com,subdomain-3.domain.com
|
||||
|
||||
##
|
||||
## OVH DynHost (https://ovh.com)
|
||||
##
|
||||
# protocol=ovh,
|
||||
# login=example.com-dynhostuser,
|
||||
# password=s3cuRePaSsw0rd
|
||||
# test.example.com
|
||||
|
|
|
|||
Loading…
Reference in a new issue