From 3a8407fa7f0def40fcbd6789586903171b5aaff6 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 17 Jun 2014 19:26:28 +0200 Subject: [PATCH] Add DynU as new provider. --- ddns.conf.sample | 5 +++++ src/ddns/__init__.py | 1 + src/ddns/providers.py | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/ddns.conf.sample b/ddns.conf.sample index bc41f83..fae8ba0 100644 --- a/ddns.conf.sample +++ b/ddns.conf.sample @@ -34,6 +34,11 @@ # username = user # password = pass +# [test.dynu.com] +# provider = dynu.com +# username = user +# password = pass + # [test.freedns.afraid.org] # provider = freedns.afraid.org # token = token diff --git a/src/ddns/__init__.py b/src/ddns/__init__.py index 30a1b8a..83e337c 100644 --- a/src/ddns/__init__.py +++ b/src/ddns/__init__.py @@ -95,6 +95,7 @@ class DDNSCore(object): DDNSProviderDNSpark, DDNSProviderDtDNS, DDNSProviderDynDNS, + DDNSProviderDynU, DDNSProviderFreeDNSAfraidOrg, DDNSProviderNOIP, DDNSProviderLightningWireLabs, diff --git a/src/ddns/providers.py b/src/ddns/providers.py index e936d72..ab05f77 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -361,6 +361,29 @@ class DDNSProviderDynDNS(DDNSProvider): raise DDNSUpdateError +class DDNSProviderDynU(DDNSProviderDynDNS): + INFO = { + "handle" : "dynu.com", + "name" : "Dynu", + "website" : "http://dynu.com/", + "protocols" : ["ipv6", "ipv4",] + } + + + # Detailed information about the request and response codes + # are available on the providers webpage. + # http://dynu.com/Default.aspx?page=dnsapi + + url = "https://api.dynu.com/nic/update" + + def _prepare_request_data(self): + data = { + "hostname" : self.hostname, + "myip" : self.get_address("ipv4"), + "myipv6" : self.get_address("ipv6"), + } + + class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): INFO = { "handle" : "freedns.afraid.org", -- 2.39.5