util.prosodyctl.check: Use net.unbound for DNS if available
Improves performance somewhat by avoiding the rate limiting in net.dns
--- a/util/prosodyctl/check.lua Thu Jun 25 19:24:58 2020 +0200
+++ b/util/prosodyctl/check.lua Thu Jun 25 19:28:51 2020 +0200
@@ -225,6 +225,9 @@
end
if not what or what == "dns" then
local dns = require "net.dns";
+ pcall(function ()
+ dns = require"net.unbound".dns;
+ end)
local idna = require "util.encodings".idna;
local ip = require "util.ip";
local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222});