Reading Time: < 1 minute

Each IsInNet generates each time a DNS request.
So if many lines, one should do use
dnsResolve()
Resolves hostnames to an IP address. This function can be used to reduce the number of DNS lookups.
Example:
var resolved_ip = dnsResolve(host);
if (isInNet(resolved_ip, “10.0.0.0”, “255.0.0.0”) ||
isInNet(resolved_ip, “172.16.0.0”, “255.240.0.0”) || 
isInNet(resolved_ip, “192.168.0.0”, “255.255.0.0”) || 
isInNet(resolved_ip, “127.0.0.0”, “255.255.255.0”))
return “DIRECT”;

0