Merge remote-tracking branch 'stevee/next-ddns-update' into next

This commit is contained in:
Michael Tremer
2015-01-11 21:24:17 +01:00
10 changed files with 125 additions and 18 deletions

View File

@@ -6,6 +6,9 @@ usr/lib/python2.7/site-packages/ddns/__init__.pyo
usr/lib/python2.7/site-packages/ddns/__version__.py
usr/lib/python2.7/site-packages/ddns/__version__.pyc
usr/lib/python2.7/site-packages/ddns/__version__.pyo
usr/lib/python2.7/site-packages/ddns/database.py
usr/lib/python2.7/site-packages/ddns/database.pyc
usr/lib/python2.7/site-packages/ddns/database.pyo
usr/lib/python2.7/site-packages/ddns/errors.py
usr/lib/python2.7/site-packages/ddns/errors.pyc
usr/lib/python2.7/site-packages/ddns/errors.pyo

View File

@@ -667,7 +667,7 @@ sub GenerateDDNSConfigFile {
my $use_token = 0;
# Handle token based auth for various providers.
if ($provider ~~ ["dns.lightningwirelabs.com", "entrydns.net", "regfish.com"] && $username eq "token") {
if ($provider ~~ ["dns.lightningwirelabs.com", "entrydns.net", "regfish.com", "spdns.de"] && $username eq "token") {
$use_token = 1;
# Handle token auth for freedns.afraid.org and regfish.com.

View File

@@ -24,7 +24,7 @@
include Config
VER = 004
VER = 005
THISAPP = ddns-$(VER)
DL_FILE = $(THISAPP).tar.xz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = ff77cb72d0cb06c73bde70419b15bae8
$(DL_FILE)_MD5 = 5fb0e7c8a775ae03074ad90d5a251a4c
install : $(TARGET)
@@ -71,6 +71,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns/ddns-005-Add-changeip-com.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns/ddns-005-SPDNS-fix-auth.patch
cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire
cd $(DIR_APP) && make $(MAKETUNING)

View File

@@ -32,9 +32,9 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = mediatomb
PAK_VER = 4
PAK_VER = 5
DEPS = "ffmpeg-libs libexif sqlite taglib "
DEPS = "ffmpeg-libs libexif taglib "
###############################################################################
# Top-level Rules

View File

@@ -32,9 +32,9 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = minidlna
PAK_VER = 3
PAK_VER = 4
DEPS = "ffmpeg flac libexif libid3tag libogg sqlite"
DEPS = "ffmpeg flac libexif libid3tag libogg"
###############################################################################
# Top-level Rules

View File

@@ -32,9 +32,9 @@ DL_FROM = http://source.ipfire.org/releases/pakfire/
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = pakfire3
PAK_VER = 4
PAK_VER = 5
DEPS = "libsolv pycurl pygpgme python-progressbar python-xattr sqlite urlgrabber"
DEPS = "libsolv pycurl pygpgme python-progressbar python-xattr urlgrabber"
###############################################################################
# Top-level Rules

View File

@@ -24,17 +24,13 @@
include Config
VER = 3070603
VER = 3080704
THISAPP = sqlite-autoconf-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = sqlite
PAK_VER = 2
DEPS = ""
###############################################################################
# Top-level Rules
@@ -44,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 7eb41eea5ffa5cbe359a48629084c425
$(DL_FILE)_MD5 = 33bb8db0038317ce1b0480ca1185c7ba
install : $(TARGET)
@@ -67,9 +63,6 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) :
$(subst %,%_MD5,$(objects)) :
@$(MD5)
dist:
@$(PAK)
###############################################################################
# Installation Details
###############################################################################

View File

@@ -0,0 +1,85 @@
commit 78046ffe2187d91c61d6c2f910249b8a5be71b08
Author: Stefan Schantl <stefan.schantl@ipfire.org>
Date: Wed Oct 22 21:39:09 2014 +0200
Add changeip.com as new provider.
Fixes #10639.
diff --git a/README b/README
index 5944102..6a06f4b 100644
--- a/README
+++ b/README
@@ -49,6 +49,7 @@ INSTALLATION:
SUPPORTED PROVIDERS:
all-inkl.com
+ changeip.com
dhs.org
dns.lightningwirelabs.com
dnspark.com
diff --git a/ddns.conf.sample b/ddns.conf.sample
index d3ac53f..0048a46 100644
--- a/ddns.conf.sample
+++ b/ddns.conf.sample
@@ -30,6 +30,11 @@
# secret = XYZ
# ttl = 60
+# [test.changeip.com]
+# provider = changeip.com
+# username = user
+# password = pass
+
# [test.dhs.org]
# provider = dhs.org
# username = user
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 1e88995..587d5ff 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -539,6 +539,44 @@ class DDNSProviderBindNsupdate(DDNSProvider):
return "\n".join(scriptlet)
+class DDNSProviderChangeIP(DDNSProvider):
+ handle = "changeip.com"
+ name = "ChangeIP.com"
+ website = "https://changeip.com"
+ protocols = ("ipv4",)
+
+ # Detailed information about the update api can be found here.
+ # http://www.changeip.com/accounts/knowledgebase.php?action=displayarticle&id=34
+
+ url = "https://nic.changeip.com/nic/update"
+ can_remove_records = False
+
+ def update_protocol(self, proto):
+ data = {
+ "hostname" : self.hostname,
+ "myip" : self.get_address(proto),
+ }
+
+ # Send update to the server.
+ try:
+ response = self.send_request(self.url, username=self.username, password=self.password,
+ data=data)
+
+ # Handle error codes.
+ except urllib2.HTTPError, e:
+ if e.code == 422:
+ raise DDNSRequestError(_("Domain not found."))
+
+ raise
+
+ # Handle success message.
+ if response.code == 200:
+ return
+
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError(_("Server response: %s") % output)
+
+
class DDNSProviderDHS(DDNSProvider):
handle = "dhs.org"
name = "DHS International"

View File

@@ -0,0 +1,23 @@
commit 25f39b4e437627bd1a49393280271d59ad28b86e
Author: Stefan Schantl <stefan.schantl@ipfire.org>
Date: Mon Jan 5 21:37:55 2015 +0100
spdns.de: Fix authentication.
There was a simple copy and paste issue which prevents a
correct authentication with username and password against the
providers API.
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 587d5ff..bcfb088 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1271,7 +1271,7 @@ class DDNSProviderSPDNS(DDNSProtocolDynDNS2, DDNSProvider):
@property
def password(self):
- return self.get("username") or self.token
+ return self.get("password") or self.token
class DDNSProviderStrato(DDNSProtocolDynDNS2, DDNSProvider):