------------------------BEGIN PATCH---------------------------
From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar kashif@compulife.com.pk Date: Fri, 22 Jan 2021 17:33:01 +0500 Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
The URL for syncing had changed and now does not require sending the ip with the request.
Signed-off-by: Kashif Iftikhar kashif@compulife.com.pk --- src/ddns/providers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 56e6620..6feef33 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
# No information about the request or response could be found on the vendor # page. All used values have been collected by testing. - url = "https://freedns.afraid.org/dynamic/update.php" + url = "https://sync.afraid.org/u/" can_remove_records = False supports_token_auth = True
def update_protocol(self, proto): - data = { - "address" : self.get_address(proto), - } + # data = { + # "address" : self.get_address(proto), + # }
# Add auth token to the update url. - url = "%s?%s" % (self.url, self.token) + url = "%s%s/" % (self.url, self.token)
# Send update to the server. - response = self.send_request(url, data=data) + response = self.send_request(url)
# Get the full response message. output = response.read().decode()
# Handle success messages. - if output.startswith("Updated") or "has not changed" in output: + if output.startswith("Updated") or output.startswith("No IP change detected"): return
# Handle error codes. -- 2.25.1
------------------------END PATCH---------------------------
Regards. Kashif Iftikhar http://kashif.compulife.com.pk
Hello Kashif,
Thank you for your email.
If the data argument is no longer required, you should remove it entirely instead of just commenting it out.
Otherwise this looks good.
Best, -Michael
On 22 Jan 2021, at 12:59, Kashif Iftikhar kashif@compulife.com.pk wrote:
------------------------BEGIN PATCH--------------------------- From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001 From: Kashif Iftikhar kashif@compulife.com.pk Date: Fri, 22 Jan 2021 17:33:01 +0500 Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
The URL for syncing had changed and now does not require sending the ip with the request.
Signed-off-by: Kashif Iftikhar kashif@compulife.com.pk
src/ddns/providers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 56e6620..6feef33 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1186,26 +1186,26 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
# No information about the request or response could be found on the vendor # page. All used values have been collected by testing.
url = "https://sync.afraid.org/u/" can_remove_records = False supports_token_auth = True
def update_protocol(self, proto):
data = {
"address" : self.get_address(proto),
}
# data = {
# "address" : self.get_address(proto),
# } # Add auth token to the update url.
url = "%s?%s" % (self.url, self.token)
url = "%s%s/" % (self.url, self.token) # Send update to the server.
response = self.send_request(url, data=data)
response = self.send_request(url) # Get the full response message. output = response.read().decode() # Handle success messages.
if output.startswith("Updated") or "has not changed" in output:
if output.startswith("Updated") or output.startswith("No IP
change detected"): return
# Handle error codes.
-- 2.25.1
------------------------END PATCH---------------------------
Regards. Kashif Iftikhar http://kashif.compulife.com.pk _______________________________________________ ddns mailing list ddns@lists.ipfire.org https://lists.ipfire.org/mailman/listinfo/ddns
Updated according to feedback.
------------------------BEGIN PATCH---------------------------
From ca4865f02594666fc7e1a4578db3465555aae860 Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar kashif@compulife.com.pk Date: Fri, 22 Jan 2021 18:24:03 +0500 Subject: [PATCH 1/1] fixes freedns.afraid.org provider.
The URL for syncing had changed and now does not require sending the ip with the request.
Signed-off-by: Kashif Iftikhar kashif@compulife.com.pk --- src/ddns/providers.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 56e6620..98d2747 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1186,26 +1186,22 @@ class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
# No information about the request or response could be found on the vendor # page. All used values have been collected by testing. - url = "https://freedns.afraid.org/dynamic/update.php" + url = "https://sync.afraid.org/u/" can_remove_records = False supports_token_auth = True
def update_protocol(self, proto): - data = { - "address" : self.get_address(proto), - } - # Add auth token to the update url. - url = "%s?%s" % (self.url, self.token) + url = "%s%s/" % (self.url, self.token)
# Send update to the server. - response = self.send_request(url, data=data) + response = self.send_request(url)
# Get the full response message. output = response.read().decode()
# Handle success messages. - if output.startswith("Updated") or "has not changed" in output: + if output.startswith("Updated") or output.startswith("No IP change detected"): return
# Handle error codes.