uwhoisd
uwhoisd copied to clipboard
Ratelimiting
While uwhoisd isn't intended to be exposed to the outside world, some ratelimiting functionality would still be worthwhile.
I've already checked in a token bucket implementation, but this needs to be paired with some kind of datastructure for mapping IPs or IP ranges to token buckets, as well as a blacklisting/whitelisting mechanism.
netaddr as a good chunk of the functionality I need. Whitelists and blacklists can be modelled using IPSet
.
The default in-memory implementation of ratelimiting can be supplemented by plugins, similarly to how cache plugins now work.