Is your feature request related to a problem? Please describe. 🐛
CrowdSec sends decisions with a scope field that can be:
"Ip" - for individual IP addresses
"Range" - for CIDR blocks like 192.168.1.0/24
"Country" - for country-based blocks
"AS" - for ASN-based blocks
This is totally ignored in current implementation, everything is treated as if it were an Ip Scope.
Describe the solution you'd like ✨
Support Country, Range and AS, proposal:
- Range should be straightforward to implement and would require a radix tree that is updated realtime to perform optimally.
- AS and Country: this middleware's purpose is NOT to geolocate incoming requests, but it could rely on an existing header (set by another middleware) to know the request country.
I already have most of the pieces to complete this, including the radix tree implementation (without CIDR removal though...) in the geoblock plugin: https://github.com/david-garcia-garcia/traefik-geoblock I believe implementing all this should be quite straightforward.
Is your feature request related to a problem? Please describe. 🐛
CrowdSec sends decisions with a scope field that can be:
"Ip" - for individual IP addresses
"Range" - for CIDR blocks like 192.168.1.0/24
"Country" - for country-based blocks
"AS" - for ASN-based blocks
This is totally ignored in current implementation, everything is treated as if it were an Ip Scope.
Describe the solution you'd like ✨
Support Country, Range and AS, proposal:
I already have most of the pieces to complete this, including the radix tree implementation (without CIDR removal though...) in the geoblock plugin: https://github.com/david-garcia-garcia/traefik-geoblock I believe implementing all this should be quite straightforward.