Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 58 lines (38 sloc) 1.518 kB
1898b66 Added JabberHole proxy application
astro authored
1 JabberHole
2 ==========
3
4
5 What is JabberHole?
6 -------------------
7
8 JabberHole is a proxy for Jabber clients. It does not only
9 relay TCP data between a client and a server, but is able to
10 intercept, generate and modify XMPP stanzas.
11
12 JabberHole is something similar to MouseHole[0], which does
13 the same for HTTP.
14
15 [0] http://mousehole.rubyforge.org/wiki/wiki.pl?MouseHole
16
17
18 How to use JabberHole?
19 ----------------------
20
21 Modify the account settings in your Jabber client. Keep the
22 JID, the proxy determines the target server from it. Just
23 set your client to connect to localhost:5224.
24
25
26 How to extend JabberHole?
27 -------------------------
28
29 JabberHole reads all scripts found in the scripts/
30 subdirectory. These scripts may hook callbacks for stanzas
31 from clients and from servers:
32
33 Proxy.add_client_callback { |stanza,cl| ... }
34 Proxy.add_server_callback { |stanza,cl| ... }
35
36 Scripts may now determine whether they take action upon the
37 received stanza.
38
39 To send a custom stanza to the client:
40 cl.send(mystanza)
41
42 To send a custom stanza to the server:
43 cl.server_conn.send(mystanza)
44
45 To determine the JID of the client, when it has already
46 authenticated:
47 cl.jid
48
49 To indicate that a stanza has been fully processed by a
50 user-scripts callback and no further callbacks are to be
51 called for this stanza, the block has to return true.
52
53 If the callback's block does not return true, server stanzas
54 are forwarded to the client and client stanzas are forwarded
55 to the server as normal behaviour. Have a look at the sample
56 scripts.
57
Something went wrong with that request. Please try again.