fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316)

### Summary
* Exempts localhost from IPLimiter
* Updates tests to have proper sequential testing with packets
* Updates tests to clean up NetState
This commit is contained in:
Kamron Batman 2026-01-20 08:54:15 -08:00 • committed by GitHub
parent 8133983b64
commit 1e4c32c809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 4612 additions and 4616 deletions

View file

@ -56,6 +56,12 @@ public class IPRateLimiter
public bool Verify(IPAddress ip, out int totalAttempts)
{
if (ip.IsPrivateNetwork())
{
totalAttempts = 0;
return true;
}
var nowTicks = Core.TickCount;
var ipStats = _ipAttempts.GetOrAdd(ip, _ => GetOrCreateIPStats());
var added = ipStats.AttemptCount == 0;