Software /
code /
prosody-modules
Comparison
mod_client_proxy/README.md @ 6003:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
author | Menel <menel@snikket.de> |
---|---|
date | Tue, 22 Oct 2024 10:26:01 +0200 |
parent | 4318:mod_client_proxy/README.markdown@3dd7840cb923 |
comparison
equal
deleted
inserted
replaced
6002:5a65a632d5b9 | 6003:fe081789f7b5 |
---|---|
1 --- | |
2 labels: | |
3 - 'Stage-Alpha' | |
4 summary: 'Proxy multiple client resources behind a single component' | |
5 ... | |
6 | |
7 What it does | |
8 ============ | |
9 | |
10 This module must be used as a component. For example: | |
11 | |
12 Component "proxy.domain.example" "client_proxy" | |
13 target_address = "some-user@some-domain.example" | |
14 | |
15 All IQ requests against the proxy host (in the above example: | |
16 proxy.domain.example) are sent to a random resource of the target address (in | |
17 the above example: some-user@some-domain.example). The entity behind the | |
18 target address is called the "implementing client". | |
19 | |
20 The IQ requests are JAT-ed (JAT: Jabber Address Translation) so that when the | |
21 implementing client answers the IQ request, it is sent back to the component, | |
22 which reverts the translation and routes the reply back to the user. | |
23 | |
24 Let us assume that user@some-domain.example sends a request. The | |
25 proxy.domain.example component has the client_proxy module loaded and proxies to | |
26 some-user@some-domain.example. some-user@some-domain.example has two resources, | |
27 /a and /b. | |
28 | |
29 user -> component: | |
30 <iq type='get' id='1234' to='proxy.domain.example' from='user@some-domain.example/abc'> | |
31 component -> implementing client: | |
32 <iq type='get' id='1234' to='some-user@some-domain.example/a' from='proxy.domain.example/encoded-from'> | |
33 implementing client -> component: | |
34 <iq type='result' id='1234' to='proxy.domain.example/encoded-from' from='some-user@some-domain.example/a'> | |
35 component -> user: | |
36 <iq type='result' id='1234' to='user@some-domain.example/abc' from='proxy.domain.example'> | |
37 | |
38 The encoded-from resource used in the exchange between the proxy component | |
39 and the implementing client is an implementation-defined string which allows | |
40 the proxy component to revert the JAT. | |
41 | |
42 | |
43 Use cases | |
44 ========= | |
45 | |
46 * Implementation of services within clients instead of components, thus making | |
47 use of the more advanced authentication features. | |
48 * Load-balancing requests to different client resources. | |
49 * General evilness | |
50 | |
51 | |
52 Configuration | |
53 ============= | |
54 | |
55 To use this module, it needs to be loaded on a component: | |
56 | |
57 Component "proxy.yourdomain.example" "client_proxy" | |
58 target_address = "implementation@yourdomain.example" | |
59 | |
60 It will then send a subscription request to implementation@yourdomain.example | |
61 which MUST be accepted: this is required so that the component can detect the | |
62 resources to which IQ requests can be dispatched. | |
63 | |
64 | |
65 Limitations | |
66 =========== | |
67 | |
68 * It does not handle presence or message stanzas. | |
69 * It does not allow the implementing client to initiate IQ requests |