From 9db9ea2539cfdeac4d12efad06156d34cf87bba1 Mon Sep 17 00:00:00 2001 From: Mauno Pirnes Date: Thu, 28 Jun 2018 12:01:53 +0100 Subject: [PATCH] Add support for dy.fi 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 d170858..02ac926 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 ea723e5..8287878 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" -- 2.39.5