Finn Joe
Finn Joe

Reputation: 11

How Do I Get DNS Server IP Address In NodeJS

I'm working on a project and stuck in the DNS Leak Tool, where I would have to perform the same task as http://dnsleak.com/ these website doing, is there any logic, where I can get fetch DNS server IP?

Really appreciate if you guys can help!

Regards, Finn

Upvotes: 1

Views: 2921

Answers (1)

Sparw
Sparw

Reputation: 2743

I think you just have to do something like this :

const dns = require('dns');

dns.getServers();

See documentation for more information.

Hope it helps.

Upvotes: 5

Related Questions