comparison mod_srvinjection/README.wiki @ 1782:29f3d6b7ad16

Import wiki pages
author Kim Alvefur <zash@zash.se>
date Mon, 24 Aug 2015 16:43:56 +0200
parents
children
comparison
equal deleted inserted replaced
1781:12ac88940fe3 1782:29f3d6b7ad16
1 #summary Manually specify SRV records
2 #labels Stage-Beta
3
4 = Introduction =
5 This Prosody plugin lets you manually override SRV records used for a remote host.
6
7 = Usage =
8 Simply add `"srvinjection"` to your `modules_enabled` list to enable. Then add the `srvinjection` option to the global section.
9
10 = Configuration =
11 The `srvinjection` option can be used as follows:
12
13 {{{
14 srvinjection = {
15 ["example.com"] = {"localhost", 5000};
16 ["jabber.org"] = {"localhost", 5001};
17 };
18 }}}
19
20 The format for individual items is `["remote-hostname"] = {"srv-hostname", srv-port};`.
21
22 The special remote hostname `"*"` can be used as a wildcard:
23 {{{
24 srvinjection = { ["*"] = {"xmpp-server.l.google.com", 5269} } -- Use Google's XMPP server for all hostnames
25 }}}
26
27 = Reloading =
28 The module can be reloaded via the telnet console. Edit the config file to make any updates.
29
30 You can reload the configuration from disk:
31 {{{
32 config:reload()
33 }}}
34 And then reload the module to apply the configuration changes:
35 {{{
36 module:reload("srvinjection", "*")
37 }}}
38
39 = Compatibility =
40 ||0.8||Works||
41 ||0.7||Works||
42 ||0.6||Works||
43
44 = How it works =
45 The module replaces the `lookup` function of the `net.adns` module with its own. The original is set back when the module is unloaded.