dns.setDefaultResultOrder(order)


  • order <string> 必须是 'ipv4first''verbatim'

设置 dns.lookup()dnsPromises.lookup()verbatim 的默认值。该值可以是:

🌐 Set the default value of verbatim in dns.lookup() and dnsPromises.lookup(). The value could be:

  • ipv4first:将默认 verbatim 设置为 false
  • verbatim:将默认 verbatim 设置为 true

默认值是 verbatimdns.setDefaultResultOrder() 的优先级高于 --dns-result-order。使用 工作线程 时,主线程的 dns.setDefaultResultOrder() 不会影响工作线程中默认的 DNS 顺序。

🌐 The default is verbatim and dns.setDefaultResultOrder() have higher priority than --dns-result-order. When using worker threads, dns.setDefaultResultOrder() from the main thread won't affect the default dns orders in workers.