]> git.ipfire.org Git - ddns.git/blobdiff - src/ddns/providers.py
Add TwoDNS as new provider.
[ddns.git] / src / ddns / providers.py
index 4e3d6b05cbfd9b658ae1d5817ccaa3530afd35d6..fdc86c69d53778f561d7a303e430f7b6915db7be 100644 (file)
@@ -361,6 +361,47 @@ 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 = DDNSProviderDynDNS._prepare_request_data(self)
+
+               # This one supports IPv6
+               data.update({
+                       "myipv6"   : self.get_address("ipv6"),
+               })
+
+               return data
+
+
+class DDNSProviderEasyDNS(DDNSProviderDynDNS):
+       INFO = {
+               "handle"    : "easydns.com",
+               "name"      : "EasyDNS",
+               "website"   : "http://www.easydns.com/",
+               "protocols" : ["ipv4",]
+       }
+
+       # There is only some basic documentation provided by the vendor,
+       # also searching the web gain very poor results.
+       # http://mediawiki.easydns.com/index.php/Dynamic_DNS
+
+       url = "http://api.cp.easydns.com/dyn/tomato.php"
+
+
 class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
        INFO = {
                "handle"    : "freedns.afraid.org",
@@ -503,11 +544,12 @@ class DDNSProviderOVH(DDNSProviderDynDNS):
        url = "https://www.ovh.com/nic/update"
 
        def _prepare_request_data(self):
-               data = {
-                       "hostname" : self.hostname,
-                       "myip"     : self.get_address("ipv4"),
-                       "system"   : "dyndns",
-               }
+               data = DDNSProviderDynDNS._prepare_request_data(self)
+               data.update({
+                       "system" : "dyndns",
+               })
+
+               return data
 
 
 class DDNSProviderRegfish(DDNSProvider):
@@ -626,6 +668,29 @@ class DDNSProviderSPDNS(DDNSProviderDynDNS):
        url = "https://update.spdns.de/nic/update"
 
 
+class DDNSProviderTwoDNS(DDNSProviderDynDNS):
+       INFO = {
+               "handle"    : "twodns.de",
+               "name"      : "TwoDNS",
+               "website"   : "http://www.twodns.de",
+               "protocols" : ["ipv4",]
+       }
+
+       # Detailed information about the request can be found here
+       # http://twodns.de/en/faqs
+       # http://twodns.de/en/api
+
+       url = "https://update.twodns.de/update"
+
+       def _prepare_request_data(self):
+               data = {
+                       "ip" : self.get_address("ipv4"),
+                       "hostname" : self.hostname
+               }
+
+               return data
+
+
 class DDNSProviderVariomedia(DDNSProviderDynDNS):
        INFO = {
                "handle"   : "variomedia.de",
@@ -648,3 +713,5 @@ class DDNSProviderVariomedia(DDNSProviderDynDNS):
                        "hostname" : self.hostname,
                        "myip"     : self.get_address(self.proto)
                }
+
+               return data