+ raise DDNSRequestError(_("Invalid IP address has been sent"))
+
+ elif output == "Too many failed requests.":
+ raise DDNSRequestError(_("Too many failed requests"))
+
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError
+
+
+class DDNSProviderDuckDNS(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "duckdns.org"
+ name = "Duck DNS"
+ website = "http://www.duckdns.org/"
+ protocols = ("ipv4",)
+
+ # Information about the format of the request is to be found
+ # https://www.duckdns.org/install.jsp
+
+ url = "https://www.duckdns.org/nic/update"
+
+
+class DDNSProviderDyFi(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "dy.fi"
+ name = "dy.fi"
+ website = "https://www.dy.fi/"
+ protocols = ("ipv4",)
+
+ # Information about the format of the request is to be found
+ # https://www.dy.fi/page/clients?lang=en
+ # https://www.dy.fi/page/specification?lang=en
+
+ url = "http://www.dy.fi/nic/update"
+
+ # Please only send automatic updates when your IP address changes,
+ # or once per 5 to 6 days to refresh the address mapping (they will
+ # expire if not refreshed within 7 days).
+ holdoff_days = 6
+
+
+class DDNSProviderDynDNS(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "dyndns.org"
+ name = "Dyn"
+ website = "http://dyn.com/dns/"
+ protocols = ("ipv4",)
+
+ # Information about the format of the request is to be found
+ # http://http://dyn.com/support/developers/api/perform-update/
+ # http://dyn.com/support/developers/api/return-codes/
+
+ url = "https://members.dyndns.org/nic/update"
+
+
+class DDNSProviderDomainOffensive(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "do.de"
+ name = "Domain-Offensive"
+ website = "https://www.do.de/"
+ protocols = ("ipv6", "ipv4")
+
+ # Detailed information about the request and response codes
+ # are available on the providers webpage.
+ # https://www.do.de/wiki/FlexDNS_-_Entwickler
+
+ 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"
+ 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"
+
+ # DynU sends the IPv6 and IPv4 address in one request
+
+ def update(self):
+ data = DDNSProtocolDynDNS2.prepare_request_data(self, "ipv4")
+
+ # This one supports IPv6
+ myipv6 = self.get_address("ipv6")
+
+ # Add update information if we have an IPv6 address.
+ if myipv6:
+ data["myipv6"] = myipv6
+
+ self.send_request(data)
+
+
+class DDNSProviderEasyDNS(DDNSProvider):
+ handle = "easydns.com"
+ name = "EasyDNS"
+ website = "http://www.easydns.com/"
+ protocols = ("ipv4",)
+
+ # Detailed information about the request and response codes
+ # (API 1.3) are available on the providers webpage.
+ # https://fusion.easydns.com/index.php?/Knowledgebase/Article/View/102/7/dynamic-dns
+
+ url = "http://api.cp.easydns.com/dyn/tomato.php"
+
+ def update_protocol(self, proto):
+ data = {
+ "myip" : self.get_address(proto, "-"),
+ "hostname" : self.hostname,
+ }
+
+ # Send update to the server.
+ response = self.send_request(self.url, data=data,
+ username=self.username, password=self.password)
+
+ # Get the full response message.
+ output = response.read()
+
+ # Remove all leading and trailing whitespace.
+ output = output.strip()
+
+ # Handle success messages.
+ if output.startswith("NOERROR"):
+ return
+
+ # Handle error codes.
+ if output.startswith("NOACCESS"):
+ raise DDNSAuthenticationError
+
+ elif output.startswith("NOSERVICE"):
+ raise DDNSRequestError(_("Dynamic DNS is not turned on for this domain"))
+
+ elif output.startswith("ILLEGAL INPUT"):
+ raise DDNSRequestError(_("Invalid data has been sent"))
+
+ elif output.startswith("TOOSOON"):
+ raise DDNSRequestError(_("Too frequent update requests have been sent"))
+
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError
+
+
+class DDNSProviderDomopoli(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "domopoli.de"
+ name = "domopoli.de"
+ website = "http://domopoli.de/"
+ protocols = ("ipv4",)
+
+ # https://www.domopoli.de/?page=howto#DynDns_start
+
+ url = "http://dyndns.domopoli.de/nic/update"
+
+
+class DDNSProviderDynsNet(DDNSProvider):
+ handle = "dyns.net"
+ name = "DyNS"
+ website = "http://www.dyns.net/"
+ protocols = ("ipv4",)
+ can_remove_records = False
+
+ # There is very detailed informatio about how to send the update request and
+ # the possible response codes. (Currently we are using the v1.1 proto)
+ # http://www.dyns.net/documentation/technical/protocol/
+
+ url = "http://www.dyns.net/postscript011.php"
+
+ def update_protocol(self, proto):
+ data = {
+ "ip" : self.get_address(proto),
+ "host" : self.hostname,
+ "username" : self.username,
+ "password" : self.password,
+ }
+
+ # 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 output.startswith("200"):
+ return