From patchwork Fri Jan 22 12:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kashif Iftikhar X-Patchwork-Id: 3815 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) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DMfTy2WQhz3wxn for ; Fri, 22 Jan 2021 12:59:18 +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 4DMfTx5p2Hz56; Fri, 22 Jan 2021 12:59:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DMfTx5k7hz2xSn; Fri, 22 Jan 2021 12:59:17 +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) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DMfTx2Qh4z2xCN for ; Fri, 22 Jan 2021 12:59:17 +0000 (UTC) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 4DMfTw67y2z56 for ; Fri, 22 Jan 2021 12:59:16 +0000 (UTC) Received: by mail-io1-xd2f.google.com with SMTP id e22so10793135iog.6 for ; Fri, 22 Jan 2021 04:59:16 -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=G3IUDJYvKXykP/BOVVuifLh6sdEr0DLZp12jIWK+Gtg=; b=aNeHHjuyTsX7QKjIQEqdGrtRsOdZLjHa05w0kl6jN3y5VhCOAj8qklGcNFS5pX2JYK R1A3+alyz5+KayAx/ksczvUFMGzpVfyNE4UTKfoK742vUaCxHmn3Cogm6ADeAfZUQkul j/P79LwvsnGDy9DQHYQM+30sI9JWKECDndqFCzSvf/LL+FSDQ1nIrMXGBafAYZ5fay5Z HPj49g5dkGMUuFyQ9DXuw1ir1KvUpMJ5A7Rh9edi6j3i01cAMDLglhCFr0yG2dgLsNDA T1J7961LoA4Waata+8CBrARmAvP/N4/Zy67fmspPF4zJPzoZM3mKv2VIl916ObAAGrbl m1Zw== 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=G3IUDJYvKXykP/BOVVuifLh6sdEr0DLZp12jIWK+Gtg=; b=hdJXYkks0FYOoBONW+AUucUX5Q1ZMH/EYvSCyDnixdDOPey1ckDrnD5SckiF9ASSDt QpD5HTBgefURwXMuP/ua6AFnvLiHYtafFR1+8Oss9iczFwvVWRHXjTfpX5Ff1L5tb/hb oU0XMhZ3vF1XsVbavW8OSWslQUnq61SA0Tbrzo+Uqzc+l0gxhQNElqifJxOMCVfSRzE0 gfPcXcJqmGzTPhIKz37exKSlISNi3DolOPfVWzQA6f3opNf4t3db7MfLFM7Ia1fO4sE9 F9VtqgAuT7nSNP7+G08N+52ZKPa9YGwF4L0tjHm6dKxc2TcR8ozuS12hxPJ1AygqYi2v 0c4g== X-Gm-Message-State: AOAM533xgTE0Q62WENUj6gnAcTivcG656rXCWi9YRQpHwwDdaFTjcxVb wgab7PbUnAB109XsYinRNqW/161N14S5xwqd8wPbQmzrHL8= X-Google-Smtp-Source: ABdhPJx8MJsG+z5DzR+1ZO0mBNfhVvxgGsU8ZbEcPpakfcloGpAiF8tE0FgO8U727LQOmnFgcbOT9vj/hMSEg8sDhVg= X-Received: by 2002:a05:6e02:1aa9:: with SMTP id l9mr1075471ilv.108.1611320355587; Fri, 22 Jan 2021 04:59:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kashif Iftikhar Date: Fri, 22 Jan 2021 17:59:04 +0500 Message-ID: Subject: [PATCH] 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=1611320356; 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=G3IUDJYvKXykP/BOVVuifLh6sdEr0DLZp12jIWK+Gtg=; b=jPy/P4IdMRPKR0sr7qbJTfFbJSPzhLtg7LK8p45Okeg86lkJev8dI2KL6yTiK5NhQt7kdZ OwbgRuTiaPGWRKxK9odNkX8HymaETsu0slCpaxXJvHBKol4ghE0roPt2gwcookQVAjozrc 8nrMxNAAzwuTG+p8WDIj3htucD9TMPiqA9G5TphVxSHGk5t29hkdJ9ihz7E824Nj9DY2Pg BLJi6wo6+zy6FTK6vG+d50hNWoPWJSXWt/u67TN5BAc6slHZ4p8ct6znHU6Qn71BbOC3/A PhIlmrAGCIx0lcHFzTdk79MOPyig0nZqWzKS/6bVw3FyQSDCM0qNjW5BKJN2PA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=compulife-com-pk.20150623.gappssmtp.com header.s=20150623 header.b=aNeHHjuy; dmarc=none; spf=none (mail01.ipfire.org: domain of kashif@compulife.com.pk has no SPF policy when checking 2607:f8b0:4864:20::d2f) smtp.mailfrom=kashif@compulife.com.pk ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1611320356; a=rsa-sha256; cv=none; b=qPXZ9EJ4v9wAA+GnXOqEwUYKP0usGRsXMQnKvMm6hJdX00+scYjS7YiSgX1FofeIetA3Jb 0diRgogHqQMJ+dpQamli0FYdLe/W9Q4Qd5PmGVi2ywlpYjNj7pHSFgGHkPYtMuWIdfAQfc SSW2vZFZtjw6jEbZhD59vv2fgErg98b5CHpfsuMXFA9WPvKXQGZ7o5MEpj7tZz9i/yQYOE POdCsZ/DoalEjHexBYSdnDC2lgiPLDyXORdqraG7VD1ynLehY7xPeVtlFt93dtK5XWPXlM PoE6Bv9WiRoiq+GS6dUSFEgY9YxMRv/BtPU+WAJHQjJsqjCEt/8zX53bGfGiFQ== X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-5.33 / 11.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[compulife-com-pk.20150623.gappssmtp.com:s=20150623]; BAYES_HAM(-3.00)[99.99%]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_REPUTATION_HAM(-2.03)[asn: 15169(-0.24), country: US(0.00), ip: 2607:f8b0:4864:20::(-0.77)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[ddns@lists.ipfire.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[compulife.com.pk]; DKIM_TRACE(0.00)[compulife-com-pk.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2f:from]; R_SPF_NA(0.00)[no SPF record]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4DMfTw67y2z56 Authentication-Results: mail01.ipfire.org; dkim=pass header.d=compulife-com-pk.20150623.gappssmtp.com header.s=20150623 header.b=aNeHHjuy; dmarc=none; spf=none (mail01.ipfire.org: domain of kashif@compulife.com.pk has no SPF policy when checking 2607:f8b0:4864:20::d2f) 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" ------------------------BEGIN PATCH--------------------------- From ed8e4a9e53cbd24e4a0450e3a8aa1c12359cbe2e Mon Sep 17 00:00:00 2001 From: Kashif Iftikhar 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 Signed-off-by: Kashif Iftikhar --- src/ddns/providers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) # Handle error codes. -- 2.25.1 ------------------------END PATCH--------------------------- Regards. Kashif Iftikhar http://kashif.compulife.com.pk 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