Changeset

10965:f5d5fc409680

util.dependencies: Prefer net.unbound over net.adns
author Kim Alvefur <zash@zash.se>
date Thu, 25 Jun 2020 17:41:07 +0200
parents 10964:d6a3d652ca32
children 10966:97de279ca01a
files util/dependencies.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/dependencies.lua	Thu Jun 25 17:26:58 2020 +0200
+++ b/util/dependencies.lua	Thu Jun 25 17:41:07 2020 +0200
@@ -104,6 +104,11 @@
 				{ "luarocks", "luarocks install luaunbound" };
 				{ "Source", "https://www.zash.se/luaunbound.html" };
 			}, "Old DNS resolver library will be used", err);
+	else
+		package.preload["net.adns"] = function ()
+			local ub = require "net.unbound";
+			return ub;
+		end
 	end
 
 	local encodings, err = softreq "util.encodings"