"""
return self.core.system.send_request(*args, **kwargs)
- def get_address(self, proto):
+ def get_address(self, proto, default=None):
"""
Proxy method to get the current IP address.
"""
- return self.core.system.get_address(proto)
+ return self.core.system.get_address(proto) or default
class DDNSProviderAllInkl(DDNSProvider):
# No information about the used update api provided on webpage,
# grabed from source code of ez-ipudate.
+
url = "http://members.dhs.org/nic/hosts"
def update(self):
# Informations to the used api can be found here:
# https://dnspark.zendesk.com/entries/31229348-Dynamic-DNS-API-Documentation
+
url = "https://control.dnspark.com/api/dynamic/update.php"
def update(self):
# Information about the format of the HTTPS request is to be found
# http://www.dtdns.com/dtsite/updatespec
+
url = "https://www.dtdns.com/api/autodns.cfm"
def update(self):
# 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"
def _prepare_request_data(self):
elif "is an invalid IP address" in output:
raise DDNSRequestError(_("Invalid IP address has been sent."))
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError
+
class DDNSProviderLightningWireLabs(DDNSProvider):
handle = "dns.lightningwirelabs.com"
- name = "Lightning Wire Labs"
+ name = "Lightning Wire Labs DNS Service"
website = "http://dns.lightningwirelabs.com/"
# Information about the format of the HTTPS request is to be found
# https://dns.lightningwirelabs.com/knowledge-base/api/ddns
+
url = "https://dns.lightningwirelabs.com/update"
def update(self):
data = {
"hostname" : self.hostname,
+ "address6" : self.get_address("ipv6", "-"),
+ "address4" : self.get_address("ipv4", "-"),
}
- # Check if we update an IPv6 address.
- address6 = self.get_address("ipv6")
- if address6:
- data["address6"] = address6
-
- # Check if we update an IPv4 address.
- address4 = self.get_address("ipv4")
- if address4:
- data["address4"] = address4
-
- # Raise an error if none address is given.
- if not data.has_key("address6") and not data.has_key("address4"):
- raise DDNSConfigurationError
-
# Check if a token has been set.
if self.token:
data["token"] = self.token