class LookupThrottler extends Object
Tracks the frequency of recent lookup requests targeting specific reply peer/tunnel pairs to prevent abuse. Implements burst detection over sliding time windows and configurable request limits.
Note this is basic DOS protection and does not prevent spoofed reply identifiers or multiple reply tunnels from malicious requestors.
| Constructor and Description |
|---|
LookupThrottler(FloodfillNetworkDatabaseFacade facade) |
LookupThrottler(FloodfillNetworkDatabaseFacade facade,
int maxlookups,
int maxnonfflookups,
long cleanTime) |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
shouldThrottle(Hash key,
TunnelId id)
increments and checks throttling
|
LookupThrottler(FloodfillNetworkDatabaseFacade facade)
LookupThrottler(FloodfillNetworkDatabaseFacade facade, int maxlookups, int maxnonfflookups, long cleanTime)
maxlookups - when floodfillmaxnonfflookups - when not floodfill