Mercurial > prosody-wiki
annotate mod_srvinjection.wiki @ 384:de32646965c3
fix typo
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Jun 2013 20:20:26 +0200 |
parents | 44f9d6dae0cc |
children |
rev | line source |
---|---|
165
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
1 #summary Manually specify SRV records |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
2 #labels Stage-Beta |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
3 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
4 = Introduction = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
5 This Prosody plugin lets you manually override SRV records used for a remote host. |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
6 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
7 = Usage = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
8 Simply add `"srvinjection"` to your `modules_enabled` list to enable. Then add the `srvinjection` option to the global section. |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
9 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
10 = Configuration = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
11 The `srvinjection` option can be used as follows: |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
12 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
13 {{{ |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
14 srvinjection = { |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
15 ["example.com"] = {"localhost", 5000}; |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
16 ["jabber.org"] = {"localhost", 5001}; |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
17 }; |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
18 }}} |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
19 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
20 The format for individual items is `["remote-hostname"] = {"srv-hostname", srv-port};`. |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
21 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
22 The special remote hostname `"*"` can be used as a wildcard: |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
23 {{{ |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
24 srvinjection = { ["*"] = {"xmpp-server.l.google.com", 5269} } -- Use Google's XMPP server for all hostnames |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
25 }}} |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
26 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
27 = Reloading = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
28 The module can be reloaded via the telnet console. Edit the config file to make any updates. |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
29 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
30 You can reload the configuration from disk: |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
31 {{{ |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
32 config:reload() |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
33 }}} |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
34 And then reload the module to apply the configuration changes: |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
35 {{{ |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
36 module:reload("srvinjection", "*") |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
37 }}} |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
38 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
39 = Compatibility = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
40 ||0.8||Works|| |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
41 ||0.7||Works|| |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
42 ||0.6||Works|| |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
43 |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
44 = How it works = |
44f9d6dae0cc
Edited wiki page mod_srvinjection through web user interface.
MWild1
parents:
164
diff
changeset
|
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. |