Hi,
sorry for the long delay. It's the time of the year, where I think it might be easier to just move in with the childrens doctor instead of daily vists :-(
Michael thank you for your pointers and reviews.
--- README | 1 + src/ddns/providers.py | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)
diff --git a/README b/README index c75c448..b6decb3 100644 --- a/README +++ b/README @@ -72,6 +72,7 @@ SUPPORTED PROVIDERS: inwx.com|de|at|ch|es itsdns.de joker.com + key-systems.net loopia.se myonlineportal.net namecheap.com diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 661fbcc..666740e 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1204,6 +1204,52 @@ class DDNSProviderJoker(DDNSProtocolDynDNS2, DDNSProvider): url = "https://svc.joker.com/nic/update"
+class DDNSProviderKEYSYSTEMS(DDNSProvider): + handle = "key-systems.net" + name = "dynamicdns.key-systems.net" + website = "https://domaindiscount24.com/" + protocols = ("ipv4",) + + # There are only information provided by the domaindiscount24 how to + # perform an update with HTTP APIs + # https://www.domaindiscount24.com/faq/dynamic-dns + # examples: https://dynamicdns.key-systems.net/update.php?hostname=hostname&password... + # https://dynamicdns.key-systems.net/update.php?hostname=hostname&password... + + url = "https://dynamicdns.key-systems.net/update.php" + can_remove_records = False + + def update_protocol(self, proto): + address = self.get_address(proto) + data = { + "hostname" : self.hostname, + "password" : self.password, + "ip" : address, + } + + # Send update to the server. + response = self.send_request(self.url, data=data) + + # Get the full response message. + output = response.read() + + # Handle success messages. + if "code = 200" in output: + return + + # Handle error messages. + if "abuse prevention triggered" in output: + raise DDNSAbuseError + elif "invalid password" in output: + raise DDNSAuthenticationError + elif "Authorization failed" in output: + raise DDNSRequestError(_("Invalid hostname specified")) + + # If we got here, some other update error happened. + raise DDNSUpdateError + + + class DDNSProviderGoogle(DDNSProtocolDynDNS2, DDNSProvider): handle = "domains.google.com" name = "Google Domains" -- 2.17.1