# HG changeset patch # User Matthew Wild # Date 1767612932 0 # Node ID f65302ea37b071c3c4bf5fa31f3e4ffd4b4922d1 # Parent 7ffb2d3ab50bc508b36dd6f0140895c76e6d70fc mod_limits: Allow configuration of general 's2s' limit, and have s2sout inherit from s2sin Most people don't currently have a limit set for s2sout, as usually such sessions don't have significant incoming traffic. However, having limits in place is still sensible, especially with the rising use of bidi. The goal here is to switch people to a general 's2s' limit, which s2sin and s2sout both inherit from. Due to the widespread existence of 's2sin' in existing configurations, s2sout will inherit from that unless explicitly set. diff -r 7ffb2d3ab50b -r f65302ea37b0 plugins/mod_limits.lua --- a/plugins/mod_limits.lua Tue Dec 09 21:41:34 2025 +0100 +++ b/plugins/mod_limits.lua Mon Jan 05 11:35:32 2026 +0000 @@ -44,7 +44,7 @@ bytes_per_second = 10 * 1024; burst_seconds = 2; }; - s2sin = { + s2s = { bytes_per_second = 30 * 1024; burst_seconds = 2; }; @@ -57,6 +57,13 @@ }; end +if not limits.s2sin and limits.s2s then + limits.s2sin = limits.s2s; +end +if not limits.s2sout then + limits.s2sout = limits.s2s or limits.s2sin; +end + local default_filter_set = {}; function default_filter_set.bytes_in(bytes, session)