Mercurial > prosody-wiki
annotate mod_srvinjection.wiki @ 116:026e0e86dd96
Fixed the wiki markup for the todo list, added some links and a new todo
author | MWild1 |
---|---|
date | Mon, 01 Feb 2010 17:49:11 +0000 |
parents | 90b363bc0fb8 |
children | 5417e7610ad4 |
rev | line source |
---|---|
96
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
1 #summary Manually specify SRV records |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
2 #labels Stage-Alpha |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
3 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
4 = Introduction = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
5 This Prosody plugin lets you manually override SRV records used for a remote host. |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
6 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
7 = Usage = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
8 Simply add `"srvinjection"` to your `modules_enabled` list to enable. Then add the `srvinjection` option to the global section. |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
9 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
10 = Configuration = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
11 The `srvinjection` option can be used as follows: |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
12 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
13 {{{ |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
14 srvinjection = { |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
15 ["example.com"] = {"localhost", 5000}; |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
16 ["jabber.org"] = {"localhost", 5001}; |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
17 }; |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
18 }}} |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
19 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
20 The format for individual items is `["remote-hostname"] = {"srv-hostname", srv-port};`. |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
21 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
22 = Reloading = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
23 The module can be reloaded via the telnet console. Edit the config file to make any updates. |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
24 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
25 You can reload the configuration from disk: |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
26 {{{ |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
27 config:reload() |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
28 }}} |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
29 And then reload the module to apply the configuration changes: |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
30 {{{ |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
31 module:reload("srvinjection", "*") |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
32 }}} |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
33 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
34 = Compatibility = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
35 ||0.6||Works|| |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
36 |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
37 = How it works = |
90b363bc0fb8
mod_srvinjection: Initial documentation commit.
Waqas Hussain <waqas20@gmail.com>
parents:
diff
changeset
|
38 The module replaces the `lookup` function of the `net.adns` module with its own. The original is set back when the module is unloaded. |