feat: add C2S/S2S_STANZA_SIZE_LIMIT env vars (default 5MB)

Add c2s_stanza_size_limit and s2s_stanza_size_limit to the config
template, backed by C2S_STANZA_SIZE_LIMIT and S2S_STANZA_SIZE_LIMIT
env vars. Both default to 5242880 (5MB) when unset, set in startup.sh.
The compose harness sets them explicitly.

Prosody 13.0.6 defaults are 256KB (c2s) and 512KB (s2s), which are too
small for large file-transfer invitations and Jitsi meet sessions.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
This commit is contained in:
2026-07-15 17:58:02 +02:00
parent 5604170914
commit d51c68c0b4
3 changed files with 19 additions and 0 deletions
+5
View File
@@ -14,6 +14,11 @@ allow_registration = false;
network_default_read_size = 8192; -- Increase buffer size to allow jitsi meet and file transfers. Default 4096.
-- Stanza size limits (bytes). Override via C2S_STANZA_SIZE_LIMIT /
-- S2S_STANZA_SIZE_LIMIT env vars. Default 5MB (5242880).
c2s_stanza_size_limit = ${C2S_STANZA_SIZE_LIMIT}
s2s_stanza_size_limit = ${S2S_STANZA_SIZE_LIMIT}
-- expose the telnet admin console (5582) beyond loopback; an external
-- service connects to it to run commands
console_interfaces = { "*" }
+12
View File
@@ -57,6 +57,18 @@ if [ -z "$componentSecret" ]; then
fi
export componentSecret
# Stanza size limits (bytes). Default 5MB to allow large file-transfer
# invitations and Jitsi meet sessions through the XMPP stream.
if [ -z "$C2S_STANZA_SIZE_LIMIT" ]; then
C2S_STANZA_SIZE_LIMIT="5242880"
fi
export C2S_STANZA_SIZE_LIMIT
if [ -z "$S2S_STANZA_SIZE_LIMIT" ]; then
S2S_STANZA_SIZE_LIMIT="5242880"
fi
export S2S_STANZA_SIZE_LIMIT
chmod 444 /etc/prosody/certs/prosody-ssl.pem
chmod 444 /etc/prosody/certs/prosody-ssl.key
+2
View File
@@ -67,6 +67,8 @@ services:
# Lower SMACKS hibernation window so test_10 can exercise expiry without
# waiting 5 minutes. startup.sh appends this to the rendered config when set.
SMACKS_HIBERNATION_TIME: "10"
C2S_STANZA_SIZE_LIMIT: "5242880"
S2S_STANZA_SIZE_LIMIT: "5242880"
healthcheck:
test: ["CMD", "/vnc/config/healthcheck.sh"]
interval: 5s