diff --git a/panel/classes/Panel/Vdns.php b/panel/classes/Panel/Vdns.php index b85772f..6203c23 100644 --- a/panel/classes/Panel/Vdns.php +++ b/panel/classes/Panel/Vdns.php @@ -89,11 +89,23 @@ class Vdns extends \Panel { if ($defaults_ns_array = $f3->call('\Panel\Vdns::returnZoneDefaultsNameserverArray', $zone)) { if ($ns_array = $f3->call('\Panel\Vdns::returnNameserverArray', $zone)) { - if ($defaults_ns_array === $ns_array) { - return "Verified"; - } else { - return "Pending"; + if ($f3->get('VDNSADDITIONALVALIDNAMERVERS') != '' && is_array($f3->get('VDNSADDITIONALVALIDNAMERVERS'))) { + $defaults_ns_array = array_merge($defaults_ns_array, $f3->get('VDNSADDITIONALVALIDNAMERVERS')); } + /* check for any nameserver match */ + foreach ($ns_array as $k=>$v) { + if (in_array($v, $defaults_ns_array)) { + return "Verified"; + } + } + /* not valid matches found, set pending */ + return "Pending"; + /* check for exact match */ + // if ($defaults_ns_array === $ns_array) { + // return "Verified"; + // } else { + // return "Pending"; + // } } else { return "Unknown"; } diff --git a/panel/config/config.ini b/panel/config/config.ini index 9881b0b..96c9a62 100644 --- a/panel/config/config.ini +++ b/panel/config/config.ini @@ -31,6 +31,9 @@ SHOWWRITEINFO=0 ; DNS admin. 1 = Yes, blank or 0 = No VDNSADMIN=0 ; Maximum number of results returned for DNS listings. Defaults to 100 if unspecified. -;PDNSMAX=100 +;VDNSMAX=100 +; By default VDNS validates nameservers against what vdns returns for default nameservers +; You can list additional nameservers that will validate here, in case you have aliased names for example +; VDNSADDITIONALVALIDNAMERVERS=ns1.example.net,ns1.example.com ; URL to phpMyPDNS. If this is set, and VDNSADMIN is enabled, show link to phpMyPDNS PHPMYPDNSURL= diff --git a/panel/ui/vdns/zones-zone.html b/panel/ui/vdns/zones-zone.html index f557062..1dddb76 100644 --- a/panel/ui/vdns/zones-zone.html +++ b/panel/ui/vdns/zones-zone.html @@ -23,7 +23,7 @@ Note that after making this change it can take up to 24 hours for the changes to go through.

- If you are intentionally using another provider for DNS you can reference the records below for what should be added to your DNS (excluding the NS & SOA records). + If you are intentionally using another provider for DNS (e.g. Cloudflare) you can reference the records below for what should be added to your DNS (excluding the NS & SOA records). The Nameserver verification system could not find nameserver information for {{ @ns_info_array.zone }}.