Revision 4a77c4ea
Added by Ionut over 8 years ago
src/etc/inc/dyndns.class | ||
---|---|---|
90 | 90 |
* - SPDYN (spdyn.de) |
91 | 91 |
* - SPDYN IPv6 (spdyn.de) |
92 | 92 |
* - All-Inkl (all-inkl.com) |
93 |
* - DuiaDNS (www.duiadns.net) |
|
94 |
* - DuiaDNS IPv6 (www.duiadns.net) |
|
93 | 95 |
* +----------------------------------------------------+ |
94 | 96 |
* Requirements: |
95 | 97 |
* - PHP version 4.0.2 or higher with the CURL Library and the PCRE Library |
... | ... | |
141 | 143 |
* SPDYN - Last Tested: 02 July 2016 |
142 | 144 |
* SPDYN IPv6 - Last Tested: 02 July 2016 |
143 | 145 |
* All-Inkl - Last Tested: 12 November 2016 |
146 |
* DuiaDNS - Last Tested: 25 November 2016 |
|
147 |
* DuiaDNS IPv6 - Last Tested: 25 November 2016 |
|
144 | 148 |
* +====================================================+ |
145 | 149 |
* |
146 | 150 |
* @author E.Kristensen |
... | ... | |
252 | 256 |
case 'he-net-v6': |
253 | 257 |
case 'custom-v6': |
254 | 258 |
case 'spdyn-v6': |
259 |
case 'duiadns-v6': |
|
255 | 260 |
case 'freedns-v6': |
256 | 261 |
case 'cloudflare-v6': |
257 | 262 |
$this->_useIPv6 = true; |
... | ... | |
320 | 325 |
case 'namecheap': |
321 | 326 |
case 'he-net': |
322 | 327 |
case 'he-net-v6': |
328 |
case 'duiadns': |
|
329 |
case 'duiadns-v6': |
|
323 | 330 |
case 'selfhost': |
324 | 331 |
case 'he-net-tunnelbroker': |
325 | 332 |
case 'route53': |
... | ... | |
625 | 632 |
$server = "https://dynamicdns.park-your-domain.com/update?host={$this->_dnsHost}&domain={$this->_dnsDomain}&password={$dnspass}&ip={$this->_dnsIP}"; |
626 | 633 |
curl_setopt($ch, CURLOPT_URL, $server); |
627 | 634 |
break; |
635 |
case 'duiadns': |
|
636 |
case 'duiadns-v6': |
|
637 |
$needsIP = FALSE; |
|
638 |
$server = "https://ipv4.duiadns.net/dyndns.duia?"; |
|
639 |
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); |
|
640 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); |
|
641 |
curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass); |
|
642 |
curl_setopt($ch, CURLOPT_URL, $server . 'hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP); |
|
643 |
break; |
|
628 | 644 |
case 'he-net': |
629 | 645 |
case 'he-net-v6': |
630 | 646 |
$needsIP = FALSE; |
... | ... | |
1249 | 1265 |
$this->_debug($data); |
1250 | 1266 |
} |
1251 | 1267 |
break; |
1252 |
|
|
1268 |
case 'duiadns': |
|
1269 |
case 'duiadns-v6': |
|
1270 |
if (preg_match("/error/i", $data)) { |
|
1271 |
$status = $status_intro . $error_str . gettext("Server side error."); |
|
1272 |
} else if (preg_match('/nohost/i', $data)) { |
|
1273 |
$status = $status_intro . $error_str . gettext("Bad Request - A hostname was not provided."); |
|
1274 |
} else if (preg_match('/badauth/i', $data)) { |
|
1275 |
$status = $status_intro . $error_str . gettext("Invalid username or password."); |
|
1276 |
} else if (preg_match('/good/i', $data)) { |
|
1277 |
$status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); |
|
1278 |
$successful_update = true; |
|
1279 |
} else if (preg_match('/nochg/i', $data)) { |
|
1280 |
$status = $status_intro . $success_str . gettext("No Change In IP Address."); |
|
1281 |
$successful_update = true; |
|
1282 |
} else { |
|
1283 |
$status = $status_intro . "(" . gettext("Unknown Response") . ")"; |
|
1284 |
log_error($status_intro . gettext("PAYLOAD:") . " " . $data); |
|
1285 |
$this->_debug($data); |
|
1286 |
} |
|
1287 |
break; |
|
1253 | 1288 |
case 'he-net': |
1254 | 1289 |
case 'he-net-v6': |
1255 | 1290 |
if (preg_match("/badip/i", $data)) { |
Also available in: Unified diff
- added support for duiadns.net ipv4 and ipv6
(cherry picked from commit 19b7263e859243adfcf6588533cb47b4c768765e)