1 commit 78046ffe2187d91c61d6c2f910249b8a5be71b08
2 Author: Stefan Schantl <stefan.schantl@ipfire.org>
3 Date: Wed Oct 22 21:39:09 2014 +0200
5 Add changeip.com as new provider.
9 diff --git a/README b/README
10 index 5944102..6a06f4b 100644
13 @@ -49,6 +49,7 @@ INSTALLATION:
19 dns.lightningwirelabs.com
21 diff --git a/ddns.conf.sample b/ddns.conf.sample
22 index d3ac53f..0048a46 100644
23 --- a/ddns.conf.sample
24 +++ b/ddns.conf.sample
29 +# [test.changeip.com]
30 +# provider = changeip.com
37 diff --git a/src/ddns/providers.py b/src/ddns/providers.py
38 index 1e88995..587d5ff 100644
39 --- a/src/ddns/providers.py
40 +++ b/src/ddns/providers.py
41 @@ -539,6 +539,44 @@ class DDNSProviderBindNsupdate(DDNSProvider):
42 return "\n".join(scriptlet)
45 +class DDNSProviderChangeIP(DDNSProvider):
46 + handle = "changeip.com"
47 + name = "ChangeIP.com"
48 + website = "https://changeip.com"
49 + protocols = ("ipv4",)
51 + # Detailed information about the update api can be found here.
52 + # http://www.changeip.com/accounts/knowledgebase.php?action=displayarticle&id=34
54 + url = "https://nic.changeip.com/nic/update"
55 + can_remove_records = False
57 + def update_protocol(self, proto):
59 + "hostname" : self.hostname,
60 + "myip" : self.get_address(proto),
63 + # Send update to the server.
65 + response = self.send_request(self.url, username=self.username, password=self.password,
68 + # Handle error codes.
69 + except urllib2.HTTPError, e:
71 + raise DDNSRequestError(_("Domain not found."))
75 + # Handle success message.
76 + if response.code == 200:
79 + # If we got here, some other update error happened.
80 + raise DDNSUpdateError(_("Server response: %s") % output)
83 class DDNSProviderDHS(DDNSProvider):
85 name = "DHS International"