To use dns.getServers() in javascript, you need to require the dns module first.
index.tsx28 chars2 lines
Once you have the dns module, you can call the getServers() method to get an array of IP addresses for the DNS servers that the system is currently using.
index.tsx91 chars5 lines
This will output something like:
index.tsx61 chars2 lines
This means that the system is currently using Google's public DNS servers (8.8.8.8 and 8.8.4.4) and OpenDNS servers (208.67.222.222 and 208.67.220.220).
gistlibby LogSnag