Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

Node.js 如何获取域名解析的DNS服务器的IP

如题,在用 Node 的 http 模块请求一个链接的时候,如何获取域名解析的 DNS 服务器的 IP 呢?
目前想到的方法是引入 Dns 模块,然后用 dns.getServers() 来获取,
但是该方法返回的是数组,如何获取本次用的是哪个服务器来进行解析的呢?
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...