annotate mod_websocket.wiki @ 437:52aacbc9ed0f

Edited wiki page mod_email_pass through web user interface.
author luisgf@gmail.com
date Thu, 13 Mar 2014 14:56:48 +0000
parents ff097d886420
children 8a6190c56c8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
1 #summary Simple XMPP-over-websocket support
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
2 #labels Stage-Beta
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
3
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
4 = Introduction =
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
5
320
188ff73d261e mod_websocket: Remove duplicate http:// (thanks Link Mauve)
Kim Alvefur <zash@zash.se>
parents: 313
diff changeset
6 [http://en.wikipedia.org/wiki/WebSocket WebSockets] is a new protocol for providing web pages with simple two-way communication with a web server.
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
7 This module allows browsers to communicate with Prosody via XMPP over !WebSockets.
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
8 This usually has less overhead then using [https://prosody.im/doc/modules/mod_bosh BOSH].
409
f57c49ef23ec Correct websocket-draft URL
florob@babelmonkeys.de
parents: 408
diff changeset
9 Note that the [https://tools.ietf.org/html/draft-ietf-xmpp-websocket XMPP over !WebSocket specification] has not been finalized yet, and is still evolving.
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
10
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
11 There are many JavaScript XMPP libraries capable of utilizing !WebSockets, among them:
312
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
12 * [https://github.com/sonnyp/lightstring Lightstring]
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
13 * [https://github.com/strophe/strophejs strophe.js >= 1.1.0]
402
421d0865f89d Update library state
florob@babelmonkeys.de
parents: 320
diff changeset
14 * [https://github.com/legastero/stanza.io stanza.io]
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
15
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
16 = Usage =
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
17
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
18 Simply add {{{"websocket"}}} to your {{{modules_enabled}}} list, as you would any other module. The repository includes a demo websocket.html file to show connecting to the socket. It doesn't perform any XMPP.
312
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
19
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
20 To allow requests that would normally break the Same-Origin policy, the {{{cross_domain_websocket}}} option can be used.
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
21 Set it to {{{true}}} to enable cross-domain requests from all websites,
312
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
22 or specify a list like
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
23 {{{
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
24 cross_domain_websocket = { "http://jabber.org", "http://prosody.im" };
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
25 }}}
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
26
408
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
27 If encryption is provided by a HTTP proxy Prosody won't be able to see this, and consider the connection insecure (consequently forbidding some authentication mechanisms). In this case Prosody can be told to always consider !WebSocket connections secure by setting
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
28 {{{
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
29 consider_websocket_secure = true;
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
30 }}}
6c4444345eea Edited wiki page mod_websocket through web user interface.
florob@babelmonkeys.de
parents: 402
diff changeset
31
427
ff097d886420 add info about default endpoint
Kim Alvefur <zash@zash.se>
parents: 409
diff changeset
32 The WebSocket endpoint will be at {{{wss://example.com:5281/xmpp-websocket}} and {{ws://example.com:5280/xmpp-websocket}} by default, see [https://prosody.im/doc/http#path_configuration HTTP path configuration] if you would like to change it.
ff097d886420 add info about default endpoint
Kim Alvefur <zash@zash.se>
parents: 409
diff changeset
33
118
a61452a7f698 Created wiki page through web user interface.
MWild1
parents:
diff changeset
34 = Compatibility =
312
e6cc6bf08560 Update to reflect current status
florob@babelmonkeys.de
parents: 118
diff changeset
35 ||0.9||Works||
427
ff097d886420 add info about default endpoint
Kim Alvefur <zash@zash.se>
parents: 409
diff changeset
36 ||< 0.9||Not supported||