comparison mod_tcpproxy/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 TCP-over-XMPP :)
2 #labels Stage-Beta
3
4 = Introduction =
5
6 It happens occasionally that I would like to use the XMPP server as a generic proxy for connecting to another service. It is especially awkward in some environments, and impossible in (for example) Javascript inside a web browser.
7
8
9 = Details =
10
11 Using mod_tcpproxy an XMPP client (including those using BOSH) can initiate a pipe to a given TCP/IP address and port. This implementation uses the [http://xmpp.org/extensions/xep-0047.html In-Band Bytestreams] XEP, simply extended with 2 new attributes in a new namespace, host and port.
12
13 An example Javascript client can be found in the web/ directory of mod_tcpproxy in the repository.
14
15 = Configuration =
16 Just add tcpproxy as a component, for example:
17
18 {{{Component "tcp.example.com" "tcpproxy"}}}
19
20 = Protocol =
21
22 A new stream is opened like this:
23
24 {{{
25 <iq type="set" id="newconn1" to="tcp.example.com">
26 <open xmlns='http://jabber.org/protocol/ibb'
27         sid='connection1'
28         stanza='message'
29 xmlns:tcp='http://prosody.im/protocol/tcpproxy'
30 tcp:host='example.com'
31 tcp:port='80' />
32 </iq>
33 }}}
34
35 The stanza attribute (currently) MUST be 'message', and a block-size, if given, is (currently) ignored.
36
37 In response to this stanza you will receive a result upon connection success, or an error if the connection failed. You can then send to the connection by sending message stanzas as described in the IBB XEP. Incoming data will likewise be delivered as messages.
38
39 = Compatibility =
40 ||0.7||Works||
41 ||0.6||Doesn't work||
42
43 = Todo =
44 * ACLs (restrict to certain JIDs, and/or certain target hosts/ports)
45 * Honour block-size (undecided)
46 * Support iq stanzas for data transmission
47 * Signal to start SSL/TLS on a connection