dns.getServers()
- 返回值: <string[]>
返回一个 IP 地址字符串数组,格式按照 RFC 5952,目前配置用于 DNS 解析。如果使用了自定义端口,字符串将包含端口部分。
【Returns an array of IP address strings, formatted according to RFC 5952, that are currently configured for DNS resolution. A string will include a port section if a custom port is used.】
[
'8.8.8.8',
'2001:4860:4860::8888',
'8.8.8.8:1053',
'[2001:4860:4860::8888]:1053',
]