From patchwork Fri Jan 22 13:26:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kashif Iftikhar X-Patchwork-Id: 3816 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DMg672rgYz3wxj for ; Fri, 22 Jan 2021 13:27:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DMg666zvGzhK; Fri, 22 Jan 2021 13:27:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DMg6667ZSz2xSn; Fri, 22 Jan 2021 13:27:10 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DMg661Y8zz2xSn for ; Fri, 22 Jan 2021 13:27:10 +0000 (UTC) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DMg645prDzhK for ; Fri, 22 Jan 2021 13:27:08 +0000 (UTC) Received: by mail-io1-xd33.google.com with SMTP id e22so10969868iog.6 for ; Fri, 22 Jan 2021 05:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compulife-com-pk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=A6XQmMUrn0yG7x6QlZgLCMuLFKQO0/fR/fmeKcks0qQ=; b=SheIel0fdLt+zuWym8zlkhfJ8UdbB8I1ApV8BdT1RnTS8kkLpBg3vxsoxIHdV2qXOF w97N1JEIV2qKAhul5+6qJUxfDmTCNxe/v+ONEgrwW0NP1E3DcKcjxyKF7wReVOxR/d0z gADJ5Vcup/tkCUseYYfTIlTHlD/fRmwJyiOYawi0O4tKhznzrC2FjmjfDoVjo/khqCAZ fQAXYks3DewbSiYJJ4PQNb0TShM2i3XUQ6WTM1aauszEKrliUSTKjzw4/KfOuMJxO8/d 4ABNw+wgiScmm29+7yxGsMwjr92bWartWtdtRt67k9GUqNSAEphsloEvdGflodUF7upF NawQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=A6XQmMUrn0yG7x6QlZgLCMuLFKQO0/fR/fmeKcks0qQ=; b=cSVq49Fe2G61wK/qMrPpTbUs98uLbdJkBSKQPEig7fFDNxm4g/nwYjC5siYq8VaN9a 4Xwa4URGrT2SihCvnBetN9+X+nbHEyobQEgD1qTDcIkJ2gPdEXrKwhUr9E3okKWHX8Ua iDfAXyztP8J6jzhlGJXiSAyKskajmV6tNl9ApiWb9APgGbUa1avzCqESg4pZPDLicyNr K/pkLeAAOVfFZjxYZnYFHVAj4dMQwQv8PDjFUuhqJ01+vjWklr7EMIXBoZDucWVzsJ/f bk68V8EQ90KHOu+qiqCQ4FK2Q31Cf7Xfx2vPB8stz4Be+29PheJDH2/HNHqlCYOOV/YJ 1kNw== X-Gm-Message-State: AOAM533b/3G8ntM0WlMI37c+tPx7kHv7aK2vjd4TmuX5nYvhKN/B2OfV ClvyD6Ae7/V0AC0pt4V+mD4dtaHMaHWSwSDP9tBiVElQBsliCw== X-Google-Smtp-Source: ABdhPJyOKLbLGvhj1LOLrGrTt/iDsMMhQW2cfNSVP3tryft0c++ak6ZUGDnrXOPNXmgp+CxKTvUm+14p2+NXQ/9fqOs= X-Received: by 2002:a02:6a0e:: with SMTP id l14mr3677456jac.58.1611322026868; Fri, 22 Jan 2021 05:27:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kashif Iftikhar Date: Fri, 22 Jan 2021 18:26:55 +0500 Message-ID: Subject: Fwd: [PATCH] [updated] Fixes freedns.afraid.org ddns provider To: ddns@lists.ipfire.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1611322028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=A6XQmMUrn0yG7x6QlZgLCMuLFKQO0/fR/fmeKcks0qQ=; b=jApFlDQ4Feh1MWZYvQ9UJbttBPjbruJ/TmjhnLdA+SH/LndZ4yBaIlsCL/ZDMPwP1+E6mR FoHocFELs4XGwYCVWkFTYLtmpWsNmQTNk3isVUkpx9XO2ilrqeaeqS5FjpIlwkgagHrD1x qPD0idyDejPfYydvvdlSzOxoclzxkvKkZsVI3iLBSuJm14EOWKb7DjD+S34c14+IyyPMWl U0QoPm2lXU/d9Xj+u+yq01wa/gndOfYnUcL8+Qa+EmsjfjYfqPW+hBE5EodECd9xUUKMKG gFEP7A6ZvheOFHaadI5O+9F6jKb5CX3zF1EBGWXvWSeckaa3PPZe9CX8JK+7TA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=compulife-com-pk.20150623.gappssmtp.com header.s=20150623 header.b=SheIel0f; dmarc=none; spf=none (mail01.ipfire.org: domain of kashif@compulife.com.pk has no SPF policy when checking 2607:f8b0:4864:20::d33) smtp.mailfrom=kashif@compulife.com.pk ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1611322028; a=rsa-sha256; cv=none; b=VAtcnaYXa3QtLfnqpoMjPbeTxNrGcb0Ohh6qWLvEtHKUeGDuZZufAbKmimJq8c40By+eQD wE6qDvUZxUCYx03NyLvyMONWTTrjmyC2/AOYigzBrFxJkaebAETXJZ3OxERgp6lqidqRFp qudsnuhsTDXxwZ7SUO54YAbiJrZxS8Su4DXRqukTfQIH1TNXUmDI1A3K2+/X106lJXPW2c OGv8Ljgiddd4G/Y/Z07NtSc1r1nAnQEykeB35HYEr4bsHzD/i6FLtMgwZF571ZzRKFAiOC 37+gonxnR0sdvXRbZfeCPfefyZzkSTyPuiat2xJVBygf4/D8WYp+KIuVQz1R7Q== X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-5.33 / 11.00]; IP_REPUTATION_HAM(-2.03)[asn: 15169(-0.24), country: US(0.00), ip: 2607:f8b0:4864:20::(-0.77)]; TO_DN_NONE(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; DKIM_TRACE(0.00)[compulife-com-pk.20150623.gappssmtp.com:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; BAYES_HAM(-3.00)[99.99%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[compulife-com-pk.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[ddns@lists.ipfire.org]; DMARC_NA(0.00)[compulife.com.pk]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d33:from]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4DMg645prDzhK Authentication-Results: mail01.ipfire.org; dkim=pass header.d=compulife-com-pk.20150623.gappssmtp.com header.s=20150623 header.b=SheIel0f; dmarc=none; spf=none (mail01.ipfire.org: domain of kashif@compulife.com.pk has no SPF policy when checking 2607:f8b0:4864:20::d33) smtp.mailfrom=kashif@compulife.com.pk X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List for the IPFire dynamic DNS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" Updated according to feedback. ------------------------BEGIN PATCH--------------------------- From ca4865f02594666fc7e1a4578db3465555aae860 Mon Sep 17 00:00:00 2001 From: Kashif Iftikhar 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 --- src/ddns/providers.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) # Handle error codes. 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