Mercurial > prosody-modules
comparison mod_s2sout_override/README.md @ 5621:b87a23b45725
mod_s2sout_override: Add support for a catch-all target
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 27 Jul 2023 15:00:26 +0200 |
parents | 6cf2f32dbf40 |
children | ae62d92506dc |
comparison
equal
deleted
inserted
replaced
5620:efdaffc878a9 | 5621:b87a23b45725 |
---|---|
16 even UNIX sockets. | 16 even UNIX sockets. |
17 | 17 |
18 URIs with IP addresses like `tcp://127.0.0.1:9999` will bypass A/AAAA | 18 URIs with IP addresses like `tcp://127.0.0.1:9999` will bypass A/AAAA |
19 DNS lookups. | 19 DNS lookups. |
20 | 20 |
21 The special target `"*"` may be used to redirect all servers that don't have | |
22 an exact match. | |
23 | |
24 Standard DNS SRV resolution can be restored by specifying a truthy value. | |
25 | |
21 ```lua | 26 ```lua |
22 -- Global section | 27 -- Global section |
23 modules_enabled = { | 28 modules_enabled = { |
24 -- other global modules | 29 -- other global modules |
25 "s2sout_override"; | 30 "s2sout_override"; |
26 } | 31 } |
27 | 32 |
28 s2sout_override = { | 33 s2sout_override = { |
29 ["example.com"] = "tcp://other.host.example:5299"; | 34 ["example.com"] = "tcp://other.host.example:5299"; |
30 ["xmpp.example.net"] = "tcp://localhost:5999"; | 35 ["xmpp.example.net"] = "tcp://localhost:5999"; |
31 ["secure.example"] = = "tls://127.0.0.1:5270"; | 36 ["secure.example"] = "tls://127.0.0.1:5270"; |
37 | |
38 -- catch-all: | |
39 ["*"] = "tls://127.0.0.1:5370"; | |
40 -- bypass the catch-all, use standard DNS SRV: | |
41 ["jabber.example"] = true; | |
32 } | 42 } |
33 ``` | 43 ``` |
34 | 44 |
35 # Compatibility | 45 # Compatibility |
36 | 46 |