Release notes
OpsProbe v0.3.12: local-first IP enrichment.
Administrator analytics now checks a local IP2region database before using the external geo provider.
Quick answer
Public visitor IP enrichment now prefers local `.xdb` lookup for faster, more reliable country, region, city, and ISP data. If the local database is missing or has no match, OpsProbe keeps the existing asynchronous `ipwho.is` fallback.
What changed
- Added a local IP2region-compatible resolver using `xdb-parse`.
- Loaded IPv4 and IPv6 `.xdb` files once at API startup.
- Recorded lookup source in `analytics_geo_cache` as `ip2region` or `ipwho.is`.
- Kept enrichment asynchronous and rate-bounded so public requests stay fast.
- Added a deployment helper for installing local database files.
Operations
Install local databases under `/opt/opsprobe/geo` or set `OPSPROBE_IP2REGION_DB_PATH` and `OPSPROBE_IP2REGION_IPV6_DB_PATH`. Missing or unreadable files are logged and skipped, so rollback can be done by removing the files or redeploying the previous binary.
Verification
- Rust format, compile, tests, and release build passed.
- A separately downloaded IP2region IPv4 database passed the ignored real-database lookup test.