Comparison

util/prosodyctl/check.lua @ 10971:3cdb4a7cb406

util.prosodyctl.check: Use net.unbound for DNS if available Improves performance somewhat by avoiding the rate limiting in net.dns
author Kim Alvefur <zash@zash.se>
date Thu, 25 Jun 2020 19:28:51 +0200
parent 10932:ea4a7619058f
child 11303:0d932bf3a0f7
comparison
equal deleted inserted replaced
10970:4603697aee50 10971:3cdb4a7cb406
223 223
224 print("Done.\n"); 224 print("Done.\n");
225 end 225 end
226 if not what or what == "dns" then 226 if not what or what == "dns" then
227 local dns = require "net.dns"; 227 local dns = require "net.dns";
228 pcall(function ()
229 dns = require"net.unbound".dns;
230 end)
228 local idna = require "util.encodings".idna; 231 local idna = require "util.encodings".idna;
229 local ip = require "util.ip"; 232 local ip = require "util.ip";
230 local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222}); 233 local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222});
231 local s2s_ports = set.new(configmanager.get("*", "s2s_ports") or {5269}); 234 local s2s_ports = set.new(configmanager.get("*", "s2s_ports") or {5269});
232 235