Make regfish DynDNS work for IPv4 and IPv6 (#2531)

regfish requires 2 different URIs to update, depending on the IP family. https://dyndns.regfish.de is for IPv4 and https://dyndns6.regfish.de is for IPv6.
This commit is contained in:
DeepCoreSystem 2021-10-19 15:19:32 +02:00 committed by GitHub
parent 35c1324a4a
commit 46ca70a224
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1044,9 +1044,11 @@ class updatedns
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
break;
case 'regfish':
$server = "https://dyndns.regfish.de/?fqdn={$this->_dnsHost}&ipv4={$this->_dnsIP}&forcehost=1&token=" . urlencode($this->_dnsUser);
curl_setopt($ch, CURLOPT_URL, $server);
break;
case 'regfish-v6':
$family = $this->_useIPv6 ? 'ipv6' : 'ipv4';
$server = "https://dyndns.regfish.de/?fqdn={$this->_dnsHost}&{$family}={$this->_dnsIP}&forcehost=1&token=" . urlencode($this->_dnsUser);
$server = "https://dyndns6.regfish.de/?fqdn={$this->_dnsHost}&ipv6={$this->_dnsIP}&forcehost=1&token=" . urlencode($this->_dnsUser);
curl_setopt($ch, CURLOPT_URL, $server);
break;
case 'linode':