Comparison

plugins/mod_s2s/mod_s2s.lua @ 11540:1937b3c3efb5 0.11

mod_c2s, mod_s2s, mod_component, mod_bosh, mod_websockets: Set default stanza size limits c2s/bosh/ws streams will default to 256KB, s2s and components to 512KB. These values are aligned with ejabberd's default settings, which should reduce issues related to inconsistent size limits between servers on the XMPP network. The previous default (10MB) is excessive for any production server, and allows significant memory usage by even unauthenticated sessions.
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 May 2021 17:03:49 +0100
parent 11237:49aeae836ad1
child 11558:d0e9ffccdef9
comparison
equal deleted inserted replaced
11539:3413fea9e6db 11540:1937b3c3efb5
35 local opt_keepalives = module:get_option_boolean("s2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true)); 35 local opt_keepalives = module:get_option_boolean("s2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
36 local secure_auth = module:get_option_boolean("s2s_secure_auth", false); -- One day... 36 local secure_auth = module:get_option_boolean("s2s_secure_auth", false); -- One day...
37 local secure_domains, insecure_domains = 37 local secure_domains, insecure_domains =
38 module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items; 38 module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items;
39 local require_encryption = module:get_option_boolean("s2s_require_encryption", false); 39 local require_encryption = module:get_option_boolean("s2s_require_encryption", false);
40 local stanza_size_limit = module:get_option_number("s2s_stanza_size_limit"); -- TODO come up with a sensible default (util.xmppstream defaults to 10M) 40 local stanza_size_limit = module:get_option_number("s2s_stanza_size_limit", 1024*512);
41 41
42 local measure_connections = module:measure("connections", "amount"); 42 local measure_connections = module:measure("connections", "amount");
43 local measure_ipv6 = module:measure("ipv6", "amount"); 43 local measure_ipv6 = module:measure("ipv6", "amount");
44 44
45 local sessions = module:shared("sessions"); 45 local sessions = module:shared("sessions");