* [PATCH] Fixes freedns.afraid.org ddns provider
[not found] <CAHoP+V9CfCQ3NCK5-Kfxn=OPYEz8ic-t4rC++pWS=erEXzgebA@mail.gmail.com>
@ 2021-01-22 12:59 ` Kashif Iftikhar
2021-01-22 13:03 ` Michael Tremer
2021-01-22 13:26 ` Fwd: [PATCH] [updated] " Kashif Iftikhar
0 siblings, 2 replies; 3+ messages in thread
From: Kashif Iftikhar @ 2021-01-22 12:59 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]
------------------------BEGIN PATCH---------------------------
>From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar <kashif(a)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(a)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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fixes freedns.afraid.org ddns provider
2021-01-22 12:59 ` [PATCH] Fixes freedns.afraid.org ddns provider Kashif Iftikhar
@ 2021-01-22 13:03 ` Michael Tremer
2021-01-22 13:26 ` Fwd: [PATCH] [updated] " Kashif Iftikhar
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tremer @ 2021-01-22 13:03 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 2613 bytes --]
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(a)compulife.com.pk> wrote:
>
> ------------------------BEGIN PATCH---------------------------
> From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001
> From: Kashif Iftikhar <kashif(a)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(a)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
> _______________________________________________
> ddns mailing list
> ddns(a)lists.ipfire.org
> https://lists.ipfire.org/mailman/listinfo/ddns
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: [PATCH] [updated] Fixes freedns.afraid.org ddns provider
2021-01-22 12:59 ` [PATCH] Fixes freedns.afraid.org ddns provider Kashif Iftikhar
2021-01-22 13:03 ` Michael Tremer
@ 2021-01-22 13:26 ` Kashif Iftikhar
1 sibling, 0 replies; 3+ messages in thread
From: Kashif Iftikhar @ 2021-01-22 13:26 UTC (permalink / raw)
To: ddns
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
Updated according to feedback.
------------------------BEGIN PATCH---------------------------
>From ca4865f02594666fc7e1a4578db3465555aae860 Mon Sep 17 00:00:00 2001
From: Kashif Iftikhar <kashif(a)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(a)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.
--
2.25.1
------------------------END PATCH---------------------------
Regards.
Kashif Iftikhar
http://kashif.compulife.com.pk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-22 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAHoP+V9CfCQ3NCK5-Kfxn=OPYEz8ic-t4rC++pWS=erEXzgebA@mail.gmail.com>
2021-01-22 12:59 ` [PATCH] Fixes freedns.afraid.org ddns provider Kashif Iftikhar
2021-01-22 13:03 ` Michael Tremer
2021-01-22 13:26 ` Fwd: [PATCH] [updated] " Kashif Iftikhar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox