Software /
code /
prosody-modules
Comparison
mod_s2sout_override/mod_s2sout_override.lua @ 5487:6cf2f32dbf40
mod_s2sout_override: Add support for Direct TLS
Well that was easy
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 24 May 2023 16:34:35 +0200 |
parent | 5486:71243bedb2b0 |
child | 5631:b87a23b45725 |
comparison
equal
deleted
inserted
replaced
5486:71243bedb2b0 | 5487:6cf2f32dbf40 |
---|---|
10 if type(override) == "string" then | 10 if type(override) == "string" then |
11 override = url.parse(override); | 11 override = url.parse(override); |
12 end | 12 end |
13 if type(override) == "table" and override.scheme == "tcp" and type(override.host) == "string" then | 13 if type(override) == "table" and override.scheme == "tcp" and type(override.host) == "string" then |
14 event.resolver = basic_resolver.new(override.host, tonumber(override.port) or 5269, override.scheme, {}); | 14 event.resolver = basic_resolver.new(override.host, tonumber(override.port) or 5269, override.scheme, {}); |
15 elseif type(override) == "table" and override.scheme == "tls" and type(override.host) == "string" then | |
16 event.resolver = basic_resolver.new(override.host, tonumber(override.port) or 5270, "tcp", | |
17 { servername = event.session.to_host; sslctx = event.session.ssl_ctx }); | |
15 end | 18 end |
16 end); | 19 end); |