This module replaces mod_s2soutinjection and uses more modern and reliable methods for overriding connection targets.


Enable the module as usual, then specify a map of XMPP remote hostnames to URIs like "tcp://host.example:port", to have Prosody connect there instead of doing normal DNS SRV resolution.

Currently supported schemes are tcp:// and tls://. A future version could support more methods including alternate SRV lookup targets or even UNIX sockets.

URIs with IP addresses like tcp:// will bypass A/AAAA DNS lookups.

The special target "*" may be used to redirect all servers that don’t have an exact match.

One-level wildcards like "*" also work.

Standard DNS SRV resolution can be restored by specifying a truthy value.

-- Global section
modules_enabled = {
    -- other global modules

s2sout_override = {
    [""] = "tcp://";
    [""] = "tcp://localhost:5999";
    ["secure.example"] = "tls://";
    ["*.allthese.example"] = = "tcp://";

    -- catch-all:
    ["*"] = "tls://";
    -- bypass the catch-all, use standard DNS SRV:
    ["jabber.example"] = true;


Prosody version status
0.12.4 Will work
0.12.3 Will not work
0.11 Will not work


With the plugin installer in Prosody 0.12 you can use:

sudo prosodyctl install --server= mod_s2sout_override

For earlier versions see the documentation for installing 3rd party modules