Module geo_filter

Module geo_filter 

Source
Expand description

GeoIP filtering for Sentinel proxy

This module provides geolocation-based request filtering using MaxMind GeoLite2/GeoIP2 and IP2Location databases. Filters can block, allow, or log requests based on country.

§Features

  • Support for MaxMind (.mmdb) and IP2Location (.bin) databases
  • Block mode (blocklist) and Allow mode (allowlist)
  • Log-only mode for monitoring without blocking
  • Per-filter IP→Country caching with configurable TTL
  • Configurable fail-open/fail-closed on lookup errors
  • X-GeoIP-Country response header injection

Structs§

GeoDatabaseWatcher
Watches geo database files for changes and triggers reloads
GeoFilterManager
Manages all geo filter instances
GeoFilterPool
A single geo filter instance with its database and cache
GeoFilterResult
Result of a geo filter check
Ip2LocationDatabase
IP2Location database backend
MaxMindDatabase
MaxMind GeoLite2/GeoIP2 database backend

Enums§

GeoLookupError
Errors that can occur during geo lookup

Traits§

GeoDatabase
Trait for GeoIP database backends