New provider: dynup.de
authorChristian Stöckl <gagella@t-online.de>
Wed, 2 Oct 2019 06:02:39 +0000 (08:02 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 2 Oct 2019 06:02:39 +0000 (08:02 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
README
src/ddns/providers.py

diff --git a/README b/README
index 0f2798e..76f63bc 100644 (file)
--- a/README
+++ b/README
@@ -64,6 +64,7 @@ SUPPORTED PROVIDERS:
        dyndns.org
        dyns.cx|net
        dynu.com
+       dynup.de
        easydns.com
        enom.com
        entrydns.net
index 12116e3..f3c62c1 100644 (file)
@@ -873,6 +873,43 @@ class DDNSProviderDomainOffensive(DDNSProtocolDynDNS2, DDNSProvider):
 
        url = "https://ddns.do.de/"
 
+class DDNSProviderDynUp(DDNSProvider):
+       handle    = "dynup.de"
+       name      = "DynUp.DE"
+       website   = "http://dynup.de/"
+       protocols = ("ipv4",)
+
+       # Information about the format of the HTTPS request is to be found
+       # https://dyndnsfree.de/user/hilfe.php
+
+       url = "https://dynup.de/dyn.php"
+       can_remove_records = False
+
+       def update_protocol(self, proto):
+               data = {
+                       "username" : self.username,
+                       "password" : self.password,
+                       "hostname" : self.hostname,
+                       "print" : '1',
+               }
+
+               # Send update to the server.
+               response = self.send_request(self.url, data=data)
+
+               # Get the full response message.
+               output = response.read()
+
+               # Remove all leading and trailing whitespace.
+               output = output.strip()
+
+               # Handle success messages.
+               if output.startswith("I:OK") :
+                       return
+
+               # If we got here, some other update error happened.
+               raise DDNSUpdateError
+
+
 
 class DDNSProviderDynU(DDNSProtocolDynDNS2, DDNSProvider):
        handle    = "dynu.com"