From patchwork Thu Jun 28 21:01:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 1845 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.i.ipfire.org (Postfix) with ESMTP id 61E7760AB9 for ; Thu, 28 Jun 2018 13:02:17 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [127.0.0.1]) by mail01.ipfire.org (Postfix) with ESMTP id 75BBB1103EEA; Thu, 28 Jun 2018 12:02:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530183734; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:list-id:list-unsubscribe:list-subscribe:list-post; bh=mjRtcQDDNl9Iu5IFHgxJ1omqB337W59u9gKH85sXBsw=; b=R3QczC4ufCKOwo/t4Wq+sqGqu3okR0d6zYxyjCA4BneR6GINCLILTRSvIpzPPBwf2ILHOG TJuV+xr3tzkKxW1fzA7ejFfHEBCtEypTTr1AxRnxTmFMzKtOYCP0SG6rDpbpCzNxhKhp9g uTBcXXCOsJvCkclxZ9lvQ2I5ZN/olPZ38djqh6aXcTsaljXu6lcPsUaT+c62ty5ktowgYa qzpQx1MCyGLooLkmReX+IPQzO4JbyyrrA02whuw5o9voDRZJrkWPwYCx1rRnFKfP1Fa//h w+t3u1UYEzYT8CP//7OUnK0KhmBInu/Wderv/9yZBkseu5zGbgqJo8k6XHC44Q== Received: from rice-oxley.tremer.co.uk (unknown [88.98.219.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id ABB731062B20; Thu, 28 Jun 2018 12:02:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1530183728; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=VD81EKkiMNjPlcQlW6gAId30W/xeR5B6Y+Rw/pvgj0Y=; b=YmJ7tJnHwH8STF7GinCsnz+OxFDsGKyMVJkj3jWALly5ha97svpWfZlJBu8Q+i+SBmdWPy TLTfqxCCu417CTO0Cj2FI2a955aWawtJEKRp1tzbRwFeblE5A1RP6TGlkeqGTo0ebMe0wB xNk6cPHiODuH/uSoQ3HCI0+7Cmd5uERP7ExGkFMTG1CLflRIipSnd5585Di/eDjrsCkNzY G9bWESc27eh674Ky2iibOJb5S5Oh1LYnoI+JAichEwl30/lL+MlnaZ0zopujGwHLdwT1zN OTwH2ak/ZCfxQHzAeKy4+qo6smlFJRj8bW90TxQCf4jLkm4uy5cJEhqLBdlhwg== From: Michael Tremer To: ddns@lists.ipfire.org Subject: [PATCH] Add support for dy.fi Date: Thu, 28 Jun 2018 12:01:53 +0100 Message-Id: <20180628110153.1776493-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.17.1 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=ms smtp.mailfrom=michael.tremer@ipfire.org X-Spamd-Result: default: False [-1.70 / 11.00]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; URL_IN_SUBJECT(0.40)[dy.fi]; RCPT_COUNT_THREE(0.00)[3]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; ASN(0.00)[asn:56478, ipnet:88.98.216.0/22, country:GB]; FROM_HAS_DN(0.00)[] X-Spam-Status: No, score=-1.70 X-Rspamd-Server: mail01.i.ipfire.org Cc: Mauno Pirnes X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List for the IPFire dynamic DNS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" From: Mauno Pirnes DyFi is a provider from Finland that only allows to point dynamic DNS records to IP addresses that are registered in Finland. Signed-off-by: Michael Tremer --- README | 1 + src/ddns/providers.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README b/README index d1708584cb14..02ac926762ce 100644 --- a/README +++ b/README @@ -60,6 +60,7 @@ SUPPORTED PROVIDERS: domopoli.de dtdns.com duckdns.org + dy.fi dyndns.org dyns.cx|net dynu.com diff --git a/src/ddns/providers.py b/src/ddns/providers.py index ea723e591667..828787872c18 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -400,6 +400,8 @@ class DDNSProtocolDynDNS2(object): raise DDNSInternalServerError(_("DNS error encountered")) elif output == "badagent": raise DDNSBlockedError + elif output == "badip": + raise DDNSBlockedError # If we got here, some other update error happened. raise DDNSUpdateError(_("Server response: %s") % output) @@ -828,6 +830,24 @@ class DDNSProviderDuckDNS(DDNSProtocolDynDNS2, DDNSProvider): url = "https://www.duckdns.org/nic/update" +class DDNSProviderDyFi(DDNSProtocolDynDNS2, DDNSProvider): + handle = "dy.fi" + name = "dy.fi" + website = "https://www.dy.fi/" + protocols = ("ipv4",) + + # Information about the format of the request is to be found + # https://www.dy.fi/page/clients?lang=en + # https://www.dy.fi/page/specification?lang=en + + url = "http://www.dy.fi/nic/update" + + # Please only send automatic updates when your IP address changes, + # or once per 5 to 6 days to refresh the address mapping (they will + # expire if not refreshed within 7 days). + holdoff_days = 6 + + class DDNSProviderDynDNS(DDNSProtocolDynDNS2, DDNSProvider): handle = "dyndns.org" name = "Dyn"