summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/dyndns.class
diff options
context:
space:
mode:
authorIonut <ionut@duiadns.net>2016-11-25 22:50:41 +0200
committerRenato Botelho <renato@netgate.com>2016-11-29 14:53:30 -0200
commit4a77c4eabca7f5ea95c50d25fc9bcac6623e7c4b (patch)
treeb671cc655276c3d53571fecda56bd70f0b1ef522 /src/etc/inc/dyndns.class
parent6cade780b17c65e720b7aed0669af754e1038a36 (diff)
downloadpfsense-4a77c4eabca7f5ea95c50d25fc9bcac6623e7c4b.zip
pfsense-4a77c4eabca7f5ea95c50d25fc9bcac6623e7c4b.tar.gz
- added support for duiadns.net ipv4 and ipv6
(cherry picked from commit 19b7263e859243adfcf6588533cb47b4c768765e)
Diffstat (limited to 'src/etc/inc/dyndns.class')
-rw-r--r--src/etc/inc/dyndns.class37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
index f6a9a37..5654653 100644
--- a/src/etc/inc/dyndns.class
+++ b/src/etc/inc/dyndns.class
@@ -90,6 +90,8 @@
* - SPDYN (spdyn.de)
* - SPDYN IPv6 (spdyn.de)
* - All-Inkl (all-inkl.com)
+ * - DuiaDNS (www.duiadns.net)
+ * - DuiaDNS IPv6 (www.duiadns.net)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with the CURL Library and the PCRE Library
@@ -141,6 +143,8 @@
* SPDYN - Last Tested: 02 July 2016
* SPDYN IPv6 - Last Tested: 02 July 2016
* All-Inkl - Last Tested: 12 November 2016
+ * DuiaDNS - Last Tested: 25 November 2016
+ * DuiaDNS IPv6 - Last Tested: 25 November 2016
* +====================================================+
*
* @author E.Kristensen
@@ -252,6 +256,7 @@
case 'he-net-v6':
case 'custom-v6':
case 'spdyn-v6':
+ case 'duiadns-v6':
case 'freedns-v6':
case 'cloudflare-v6':
$this->_useIPv6 = true;
@@ -320,6 +325,8 @@
case 'namecheap':
case 'he-net':
case 'he-net-v6':
+ case 'duiadns':
+ case 'duiadns-v6':
case 'selfhost':
case 'he-net-tunnelbroker':
case 'route53':
@@ -625,6 +632,15 @@
$server = "https://dynamicdns.park-your-domain.com/update?host={$this->_dnsHost}&domain={$this->_dnsDomain}&password={$dnspass}&ip={$this->_dnsIP}";
curl_setopt($ch, CURLOPT_URL, $server);
break;
+ case 'duiadns':
+ case 'duiadns-v6':
+ $needsIP = FALSE;
+ $server = "https://ipv4.duiadns.net/dyndns.duia?";
+ curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass);
+ curl_setopt($ch, CURLOPT_URL, $server . 'hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);
+ break;
case 'he-net':
case 'he-net-v6':
$needsIP = FALSE;
@@ -1249,7 +1265,26 @@
$this->_debug($data);
}
break;
-
+ case 'duiadns':
+ case 'duiadns-v6':
+ if (preg_match("/error/i", $data)) {
+ $status = $status_intro . $error_str . gettext("Server side error.");
+ } else if (preg_match('/nohost/i', $data)) {
+ $status = $status_intro . $error_str . gettext("Bad Request - A hostname was not provided.");
+ } else if (preg_match('/badauth/i', $data)) {
+ $status = $status_intro . $error_str . gettext("Invalid username or password.");
+ } else if (preg_match('/good/i', $data)) {
+ $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!");
+ $successful_update = true;
+ } else if (preg_match('/nochg/i', $data)) {
+ $status = $status_intro . $success_str . gettext("No Change In IP Address.");
+ $successful_update = true;
+ } else {
+ $status = $status_intro . "(" . gettext("Unknown Response") . ")";
+ log_error($status_intro . gettext("PAYLOAD:") . " " . $data);
+ $this->_debug($data);
+ }
+ break;
case 'he-net':
case 'he-net-v6':
if (preg_match("/badip/i", $data)) {
OpenPOWER on IntegriCloud