dns.resolveTxt(hostname, callback)


使用 DNS 协议解析针对 hostname 的文本查询(TXT 记录)。传递给 callback 函数的 records 参数是一个二维数组,包含 hostname 可用的文本记录(例如 [ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ])。每个子数组包含一条记录的 TXT 块。根据使用情况,这些块可以被合并在一起,也可以单独处理。

【Uses the DNS protocol to resolve text queries (TXT records) for the hostname. The records argument passed to the callback function is a two-dimensional array of the text records available for hostname (e.g. [ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately.】