Merge remote-tracking branch 'stevee/dynu.com'
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jun 2014 17:57:50 +0000 (19:57 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jun 2014 17:57:50 +0000 (19:57 +0200)
Conflicts:
ddns.conf.sample
src/ddns/__init__.py
src/ddns/providers.py

1  2 
ddns.conf.sample
src/ddns/__init__.py
src/ddns/providers.py

  # username = user
  # password = pass
  
+ # [test.dynu.com]
+ # provider = dynu.com
+ # username = user
+ # password = pass
 +# [test.easydns.com]
 +# provider = easydns.com
 +# username = user
 +# password = pass
 +
  # [test.freedns.afraid.org]
  # provider = freedns.afraid.org
  # token = token
@@@ -95,7 -95,7 +95,8 @@@ class DDNSCore(object)
                        DDNSProviderDNSpark,
                        DDNSProviderDtDNS,
                        DDNSProviderDynDNS,
+                       DDNSProviderDynU,
 +                      DDNSProviderEasyDNS,
                        DDNSProviderFreeDNSAfraidOrg,
                        DDNSProviderNOIP,
                        DDNSProviderLightningWireLabs,
@@@ -361,21 -361,29 +361,44 @@@ 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 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",