Thu, 22 Jun 2023 21:29:31 +0100
main: Tweaks for prosody trunk (use unbound, fix HTTPS client)
src/main.lua | file | annotate | diff | comparison | revisions |
--- a/src/main.lua Thu Jun 22 21:29:02 2023 +0100 +++ b/src/main.lua Thu Jun 22 21:29:31 2023 +0100 @@ -5,6 +5,9 @@ package.cpath = ("%s/?.so;%s"):format(LUA_WEB_APP_FRAMEWORK, package.cpath); end +package.preload["net.adns"] = function () + return (require "net.unbound"); +end; local ssl = require "ssl"; local server = require "net.server_epoll"; local envload = require"util.envload"; @@ -58,6 +61,11 @@ end log("debug", "Logging ready"); + -- Configure HTTP client + require "net.http".default.options.sslctx = server.tls_builder(".") + :apply({mode="client", protocol="sslv23", options="no_sslv2",capath="/etc/ssl/certs"}) + :build(); + require "http".init(config, events); -- Load optional extensions specified in the config