mod_disable_tls/mod_disable_tls.lua
author Kim Alvefur <zash@zash.se>
Wed, 03 Mar 2021 11:43:38 +0100
changeset 4494 cf2bdb2aaa57
parent 1482 25be5fde250f
permissions -rw-r--r--
mod_s2s_auth_dane: Disable now redundant validation done in trunk Outgoing connections can now be validated natively in trunk since a38f9e09ca31 so we only need to check incoming connections.

local disable_tls_ports = module:get_option_set("disable_tls_ports", {});

module:hook("stream-features", function (event)
	if disable_tls_ports:contains(event.origin.conn:serverport()) then
		module:log("error", "Disabling TLS for client on port %d", event.origin.conn:serverport());
		event.origin.conn.starttls = false;
	end
end, 1000);