Do not resolve IPv4/v6 addresses to prevent slowdown

This commit is contained in:
ValdikSS 2020-12-19 17:52:59 +03:00
parent 89ca209c91
commit adcb263f4a

View File

@ -86,7 +86,11 @@ echo " if (domains.length < 10) return \"DIRECT\"; // list is broken
var curarr = domains[curzone][curhost.length]; var curarr = domains[curzone][curhost.length];
} }
var oip = dnsResolve(host); var oip = false;
if (! host.match(/^[0-9a-fA-F:.]*$/)) {
// Do not resolve IPv4/v6 addresses to prevent slowdown
oip = dnsResolve(host);
}
var iphex = \"\"; var iphex = \"\";
if (oip) { if (oip) {
iphex = oip.toString().split(\".\"); iphex = oip.toString().split(\".\");