mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 00:03:12 +02:00
89075e532a
This is the start of "be more friendly to TLS users with disconnect error messages" from https://bugs.unrealircd.org/view.php?id=5532 As that bug explains: Consider doing the SSL/TLS handshake even for throttling errors and such when the (reject) connection rate is below a certain amount per second. If it is higher than a certain rate, then fall back to the original behavior to reject the user instantly without handshake or looking at any data. Rationale: the current/original behavior is there so the ircd can handle floods, both in terms of traffic and in terms of CPU usage (the SSL/TLS handshake is quite costly after all). The downside of the current behavior is that TLS users don't see the error message, usually. This feature request tries to find a middle ground. Still a TODO item: * We don't detect high rates yet, so we only do this new behavior atm and not yet the old behavior during high connection rates. * Verify that error messages/behavior hasn't changed (too) much, like the throttling and the banning disconnect messages.