Reputation: 83
With NodeJs, the "dns" library don't use dns suffix to resolve hostname.
await dns.promises.resolve('foo.ad.toto.fr')
>>> [ '10.1.40.205' ]
await dns.promises.resolve('foo')
>>> Error: queryA ENOTFOUND foo
ipconfig /all
Configuration IP de Windows
Nom de l’hôte . . . . . . . . . . : arc-pc-y399539
Suffixe DNS principal . . . . . . : ad.toto.fr
Type de noeud. . . . . . . . . . : Hybride
Routage IP activé . . . . . . . . : Non
Proxy WINS activé . . . . . . . . : Non
Liste de recherche du suffixe DNS.: ad.toto.fr
So I need to get "DNS Suffixes list" but I don't know how...
And i can't parse return of command "ipconfig" since it must be compatible with windows and linux
Upvotes: 1
Views: 337
Reputation: 83
I found the package "systeminformation" to get primary dns suffix, but not the "DNS Suffixes list"
Upvotes: 1