OperServ: per-IP session limiting with exceptions
The connection that puts an IP over its allowance is killed on connect. The ircd's per-user IP (UID param 7) is now plumbed through UserConnect and tracked per-IP in the live network view (incremented on connect, released on quit). - [session] default_limit sets the base allowance (0/absent = off). - OperServ SESSION LIST <min> / VIEW <ip> inspect live counts. - OperServ EXCEPTION ADD <ip-mask> <limit> [reason] / DEL / LIST override the limit per IP-mask (limit 0 = unlimited); event-sourced so they federate and survive restart, matched most-permissive-wins. All admin-gated.
This commit is contained in:
parent
78ad909706
commit
76a7162227
11 changed files with 410 additions and 116 deletions
|
|
@ -115,6 +115,9 @@ async fn main() -> Result<()> {
|
|||
if let Some(expire) = &cfg.expire {
|
||||
engine.lock().await.set_expiry(expire.account_ttl(), expire.channel_ttl(), expire.warn_ttl());
|
||||
}
|
||||
if let Some(session) = &cfg.session {
|
||||
engine.lock().await.set_session_limit(session.limit());
|
||||
}
|
||||
|
||||
if let Some(gossip) = cfg.gossip.clone() {
|
||||
tracing::info!(peers = cfg.peer.len(), "starting gossip");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue