From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jCKhq0pYPz3390 for ; Sun, 25 Oct 2026 15:01:31 +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 (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jCKhp36ynz2xLm for ; Sun, 25 Oct 2026 15:01:30 +0000 (UTC) Received: from mail-wm2-x0b.google.com (mail-wm2-x0b.google.com [IPv6:2a00:1450:4864:31::b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jCKhn1cs8z21C for ; Sun, 25 Oct 2026 15:01:29 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=ok13Ul6M; spf=pass (mail01.ipfire.org: domain of solvecomputersciencecollabs@gmail.com designates 2a00:1450:4864:31::b as permitted sender) smtp.mailfrom=solvecomputersciencecollabs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1792940489; b=ArCQgEWEp6BBrgXRxDX8mCup1yFi+Aqyo+Y4bxGdV9CutmncK4KfqfGEg/CxExTWfd1I4u UUwiXq7fMcLg2mlxwPUAWl7R2bxzHVYelLwDb8NHunqSsB6CIShV5IJ9Wtm1QTciE9IyDe OBsR9AQNzPzXrdDCAThwEV6u+YkL1SP5noSTbpmmH6jiLBcOXo+gQ0OPs6gARnzTaf3jXI JHEuuBksUE1CRraPgQi6JgjQqXwfAdfs35k3zqQSw/nOlU8NP6T43rLpx4tbfIkq8QfWyO /oiDonYiXQfiuGWgPwAQFCXyAzF+4rq/L6Fn4VvBpdFwBS702qIsAP2kgk1Q+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1792940489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=S66sfGXo7d72j9BvJfm98Oh/e7l414oGoZueusNiW0M=; b=CRkCqqWe41+BEz1WtnPPS2h10tJCfHHEX8FZr667spuWHP8DcPYS1uoWD+IpAhJHeooe1b nAaQ1Yn4Q/NtS3+AY8xoc+5Yef0/klY0waDCr3Qt0xtOIqW2ZB41VsoSZJ467onKvneZtZ DgFvpS4caHKOjZ5MNyA1awZR74yHzFyh7oO0dPKeDnDRPE9AAuziJLVl6bfwH0DdzFeKzU N7ilYOCcEnc/j0avBmLLBiMjnnbm1mFjhbO0wqKiT3S3j8Oi6RkLB9O51wXlkKlT+vRiHP bt8PmTN3wrhWacs6JOn6Pnzf2svtXixqWqQqRzYl9mQdrnldfiBCVVYfY5NXUQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=ok13Ul6M; spf=pass (mail01.ipfire.org: domain of solvecomputersciencecollabs@gmail.com designates 2a00:1450:4864:31::b as permitted sender) smtp.mailfrom=solvecomputersciencecollabs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wm2-x0b.google.com with SMTP id 5b1f17b1804b1-4a16dfb8fa6so12246855e9.1 for ; Sun, 25 Oct 2026 08:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792940488; x=1793545288; darn=lists.ipfire.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=S66sfGXo7d72j9BvJfm98Oh/e7l414oGoZueusNiW0M=; b=ok13Ul6MK8UecthmScwE839PXS1LDvLFKtVd50TSOaUNHKqbSW0ak7Hf47++Xz8t62 g17fRzq+lGI0gO1YEsLRw9DHy1L4fAj2I1X+aaShi7za3c9d4Ui1RmJLM0o+kD+nujmj 2mQIDsqL0MFHJcBA3Tz38LmZrjtIYw7eJ4tFhkfvoQGi/MTVzPaO9JFyVQLiRLqgLiRd AbO/vxzF6bNDUTpkeDW/PDgUUv2P9ISdMbA+9Qc7q0020fbc2aoqyaHcetQqEk8E1srW htNlpMqJbvpmiSIrnRtLRn0oFa83EekEhgnygbthSrOfZkTl/Xvocsn+1EQEYHlqKZIN W/DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792940488; x=1793545288; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=S66sfGXo7d72j9BvJfm98Oh/e7l414oGoZueusNiW0M=; b=wAE6exLycut9iBxIXB1QT3wAhoi3GmuQyGGB4tOpRN9PpkHhCBdRedVoQJeX4J0EVc vkzt/WUwExW0XY8aDzrONWCX50eydm3A9R6G6d/pfbdYibdX5ETeIxd1nMc75LHOOK9R Q7kwel7UQeb0ZbiAXlbqrYhWy93VOQqhIaY9NLYS3pRyHp3pjTlQ3aG/Nr9sLn2/aFea S8WOHnt1XtHK6dqseLFfkeXkMbasrxqYNHI7Q95w/t6ACvU3joCayiS9CWvMPbtpuVDS 7Z+ID/5hHI9/6Joyqc5n7VBns2quiqrpGDowg9VKF0Z6VD2YiD24rE5tYPDRtKZkeI2d PdfQ== X-Gm-Message-State: AFq9FYKnYMMO84DHmgxeUHNxlxcVi/iIbg4iXJplt66mk/i149LjeBVL y0R8mBWttHKeccAsPzkbd2E9fQPsSAMx9cdkx7gL+PdYddydnzE1CUfRIzGPxbtPENJRFA== X-Gm-Gg: AYBFou2rZhexesBY0kwLpB2CYvpXMxlLZYU1Q+cg+tfuJ1SjRvxQfqcM+yyBnhUTbBm Gq3fidfbJ57ZLEzIPmlJxesWmS8iYKLf6kuy/en4nTCeF2JCfjVN8kMgSrqrhT3Zm8vwTGw0ZnV WRMKRCOr4fCNdVz25v2twUSGExwcoNEQMseq1r3uqYuIDrvW925B+Fb6G5IW9brg4tbh2WDqt08 fwdMP/Fq+Vo9REvNvoShoodU0IG/9gS3N1qJQOymusCWKpXoTgRZTh0klGbiAUhV/XyxVkrq+T2 ABWOi75rivn82pjKj8MBkmM0A884rNSgG1M/WC/gsEEUYp99POom2/N7q4dKNF7CcdIwFMsM/Es zWweQHcsQNZpNUURqb9ndS0+xVBT9on8B13dIUkbqB0o6GhOukCIpeIspTyloeANOvgif+0xpZ1 IVP1An6vQvTklW9hjL67Ck61N8DBFLeCeHWCmnmcwja9o4y3eNCDIrJa2vluuGqjwrraRXZ/Q0C /zHUQKEziCmfSXTxrCXUrCZpjUwkBuMU2f9PIuRr/h+bSSlJj94I9U6QsYVzlGbjpnTK6o2eWLa ZuwC84Ckq0+1yw== X-Received: by 2002:a05:600c:6095:b0:4a1:f7f4:7cf1 with SMTP id 5b1f17b1804b1-4a35ac8bf3amr65776125e9.11.1792940487961; Sun, 25 Oct 2026 08:01:27 -0700 (PDT) Received: from localhost.localdomain ([82.84.12.188]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a35a09434esm126760435e9.0.2026.10.25.08.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2026 08:01:27 -0700 (PDT) From: Franco Masotti To: ddns@lists.ipfire.org Cc: Franco Masotti Subject: [PATCH 001/001] ddns: Add 1984.hosting Free DNS (DDNS) provider Date: Sun, 25 Oct 2026 16:01:19 +0100 Message-ID: <20261025150119.26418-1-solvecomputersciencecollabs@gmail.com> X-Mailer: git-send-email 2.47.3 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Spamd-Result: default: False [-5.82 / 11.00]; BAYES_HAM(-3.00)[100.00%]; R_DKIM_ALLOW(-1.60)[gmail.com:s=20251104]; MID_CONTAINS_FROM(1.00)[]; DKIM_REPUTATION(-0.97)[-0.96939418973879]; SPF_REPUTATION_HAM(-0.75)[-0.74975344495835]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_MISSING_CHARSET(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4864::/56]; R_DKIM_ALIGNED(-0.10)[strict]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.10)[gmail-smtp-in.l.google.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; IP_REPUTATION_HAM(0.00)[asn: 15169(-0.29), country: US(-0.01), ip: 2a00:1450:4864:31::(-0.95)]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:31::b:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RECEIVED_SPAMHAUS_PBL(0.00)[82.84.12.188:received]; PREVIOUSLY_DELIVERED(0.00)[ddns@lists.ipfire.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_HAS_DN(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4jCKhn1cs8z21C From: Franco Masotti This patch adds support for 1984.hosting Free DNS to the ddns service. This provider uses token authorization and a GET request with inline parameters. Signed-off-by: Franco Masotti --- ddns.conf.sample | 4 +++ src/ddns/providers.py | 68 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/ddns.conf.sample b/ddns.conf.sample index f1adf5d..a8f6ac8 100644 --- a/ddns.conf.sample +++ b/ddns.conf.sample @@ -14,6 +14,10 @@ # Accounts are its own sections. # These are some examples. +# +# [test.1984.hosting] +# provider = 1984.hosting +# token = token # [test.all-inkl.com] # provider = all-inkl.com diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 59f9665..e5e3a7b 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -2017,3 +2017,71 @@ class DDNSProviderInfomaniak(DDNSProtocolDynDNS2, DDNSProvider): # https://www.infomaniak.com/de/support/faq/2376/dyndns-aktualisieren-eines-dynamischen-dns-uber-die-api url = "https://infomaniak.com/nic/update" + + +class DDNSProvider1984Hosting(DDNSProvider): + handle = "1984.hosting" + name = "1984 Hosting Free DNS" + website = "http://1984.hosting" + protocols = ("ipv6", "ipv4",) + + # Information about the format of the request is to be found after logging + # in. The account and usage it totally free of cost + # https://1984.hosting/domains/freednsapi/ + # + # General information on FreeDNS + # https://1984.hosting/knowledge-base/freedns/ + # + # examples: https://api.1984.is/1.0/freedns/?apikey=apikey&domain=domain&ip= + # https://api.1984.is/1.0/freedns/?apikey=apikey&domain=domain&ip=213.x.x.x + url = "https://api.1984.is/1.0/freedns/" + can_remove_records = False + supports_token_auth = True + + def update_protocol(self, proto): + # Raise an error if no auth details are given. + if not self.token: + raise DDNSConfigurationError + + address = self.get_address(proto) + data = { + "domain" : self.hostname, + "apikey" : self.token, + "ip" : address, + } + + # Send update to the server. + response = self.send_request(self.url, data=data) + + # Get the full response message. + output = response.read().decode() + + try: + # JSON Response official documentation: + # + # { + # "ok": true or false depending on if the request was successful or not, if the ip is the same as before this will be true, + # "msg": successes or why it is not working, + # "lookup": if domain or subdomain was not found lookup will contain a list of names tried + # } + res = json.loads(output) + except json.JSONDecodeError: + raise DDNSUpdateError(_("Unable to decode server response, assuming request failed")) + + if res.get("ok", False): + return + else: + # API reurns an undocumented 'error' JSON key-value if key is wrong. + error = res.get("error", "") + if error: + raise DDNSAuthenticationError + else: + message = res.get("msg", "") + if "record does not exist" in message: + raise DDNSRequestError(_("Invalid hostname specified")) + else: + raise DDNSUpdateError(_("Server response: %s") % message) + + # If we got here, some other update error happened. + raise DDNSUpdateError + -- 2.47.3