Mercurial > prosody-modules
annotate mod_compression_unsafe/README.markdown @ 3704:c6563625f60e
mod_http_muc_log: More blue links to distinguish them as such (thanks jonas’)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 09 Oct 2019 21:51:01 +0200 |
parents | 4b7e6c01aa1c |
children |
rev | line source |
---|---|
2776
3092ae96c1f0
mod_compression: Rename to mod_compression_unsafe and add security note
Matthew Wild <mwild1@gmail.com>
parents:
2486
diff
changeset
|
1 **NOTE:** XMPP compression has unresolved [security concerns](https://mail.jabber.org/pipermail/standards/2014-October/029215.html), |
3092ae96c1f0
mod_compression: Rename to mod_compression_unsafe and add security note
Matthew Wild <mwild1@gmail.com>
parents:
2486
diff
changeset
|
2 and this module has been removed from Prosody and renamed. |
3092ae96c1f0
mod_compression: Rename to mod_compression_unsafe and add security note
Matthew Wild <mwild1@gmail.com>
parents:
2486
diff
changeset
|
3 |
2483
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
4 While the bandwidth usage of XMPP isn't that much, compressing the data |
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
5 sent to/from your server can give significant benefits to those on slow |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 connections, such as dial-up or mobile networks. Prosody supports |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 compression for client-to-server (if your client supports it) and |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 server-to-server streams using the mod\_compression plugin. |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 # Details |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
2483
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
12 mod\_compression implements [XEP-0138], and supports the zlib compression |
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
13 algorithm. |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 ## Dependencies |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 The XMPP protocol specifies that all clients and servers supporting |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 compression must support the "zlib" compression method, and this is what |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 Prosody uses. However you will need to install zlib support for Lua on |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 your system. There are different ways of doing this depending on your |
2484
560378965b82
mod_compression/README: Fix formatting
Kim Alvefur <zash@zash.se>
parents:
2483
diff
changeset
|
21 system. If in doubt whether it is installed correctly, the command |
2486
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
22 `lua -lzlib` in a console should open a Lua prompt with no errors. |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
23 |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
24 Debian/Ubuntu |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
25 : `apt-get install lua-zlib` |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 |
2486
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
27 LuaRocks |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
28 : `luarocks install lua-zlib` |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
29 |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
30 Source |
a5d4a78c7619
mod_compression/README: Include lua-zlib installation instructions and link to source
Kim Alvefur <zash@zash.se>
parents:
2484
diff
changeset
|
31 : <https://github.com/brimworks/lua-zlib> |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 # Usage |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
34 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
35 ``` lua |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
36 modules_enabled = { |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
37 -- Other modules |
2793
4b7e6c01aa1c
mod_compression_unsafe README: Fix module name (thanks Flow)
Matthew Wild <mwild1@gmail.com>
parents:
2776
diff
changeset
|
38 "compression_unsafe"; -- Enable mod_compression_unsafe |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
39 } |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
40 ``` |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
41 |
2483
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
42 ## Configuration |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
43 |
2483
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
44 The compression level can be set using the `compression_level` option |
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
45 which can be a number from 1 to 9. Higher compression levels will use |
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
46 more resources but less bandwidth. |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
47 |
2483
b3097323278f
mod_compression/README: Some cleanup and rewording
Kim Alvefur <zash@zash.se>
parents:
2482
diff
changeset
|
48 ## Example |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
49 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
50 ``` lua |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 modules_enabled = { |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
52 -- Other modules |
2793
4b7e6c01aa1c
mod_compression_unsafe README: Fix module name (thanks Flow)
Matthew Wild <mwild1@gmail.com>
parents:
2776
diff
changeset
|
53 "compression_unsafe"; -- Enable mod_compression_unsafe |
2482
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 } |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
56 compression_level = 5 |
c96a53b0b820
mod_compression: Import from Prosody, revision 0c69305ab525
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
57 ``` |