Software /
code /
prosody
Comparison
plugins/mod_s2s.lua @ 13298:b7c08f32112c
mod_s2s: Automagically enable DANE for s2sin if 'use_dane' is enabled
Simplifies configuration, only one already existing boolean to flip.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Nov 2023 09:39:03 +0100 |
parent | 13253:68d540df46b8 |
child | 13382:f70311588c77 |
comparison
equal
deleted
inserted
replaced
13297:7264c4d16072 | 13298:b7c08f32112c |
---|---|
92 use_ipv4 = module:get_option_boolean("use_ipv4", true); | 92 use_ipv4 = module:get_option_boolean("use_ipv4", true); |
93 use_ipv6 = module:get_option_boolean("use_ipv6", true); | 93 use_ipv6 = module:get_option_boolean("use_ipv6", true); |
94 use_dane = module:get_option_boolean("use_dane", false); | 94 use_dane = module:get_option_boolean("use_dane", false); |
95 }; | 95 }; |
96 local s2s_service_options_mt = { __index = s2s_service_options } | 96 local s2s_service_options_mt = { __index = s2s_service_options } |
97 | |
98 if module:get_option_boolean("use_dane", false) then | |
99 -- DANE is supported in net.connect but only for outgoing connections, | |
100 -- to authenticate incoming connections with DANE we need | |
101 module:depends("s2s_auth_dane_in"); | |
102 end | |
97 | 103 |
98 module:hook("stats-update", function () | 104 module:hook("stats-update", function () |
99 measure_connections_inbound:clear() | 105 measure_connections_inbound:clear() |
100 measure_connections_outbound:clear() | 106 measure_connections_outbound:clear() |
101 -- TODO: init all expected metrics once? | 107 -- TODO: init all expected metrics once? |