WIP: network: implement basic ratelimiting #1

Draft
NotAShelf wants to merge 16 commits from multi-site-proxy into main
Showing only changes of commit 66993ebdec - Show all commits

state: drop state in tests

raf 2025-05-02 10:50:47 +03:00
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -146,6 +146,7 @@ mod tests {
state.blocked.insert(ip1);
assert!(state.blocked.contains(&ip1));
assert!(!state.blocked.contains(&ip2));
drop(state);
}
// Test active connections
@ -159,6 +160,7 @@ mod tests {
assert_eq!(state.active_connections.len(), 1);
assert!(!state.active_connections.contains(&ip1));
assert!(state.active_connections.contains(&ip2));
drop(state);
}
}
}