mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
geo: replace ip-api.com with local DB-IP City Lite MMDB
- Rewrite nginxmon/geo.py to use maxminddb + DB-IP City Lite MMDB (https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz) instead of ip-api.com HTTP API — eliminates all network timeouts and rate-limit issues; lookups are now sub-millisecond in-process - Keep _lookup_batch() signature unchanged so routermon receiver requires no changes - MMDB downloaded on first use (lazy) and refreshed monthly via APScheduler; reader cached module-level (thread-safe for reads) - Add management command: manage.py download_geo_db - Update k8s init container to download MMDB on first deploy if absent - Add maxminddb==3.1.1 dependency CC BY 4.0 — DB-IP (https://db-ip.com) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,7 @@ dependencies = [
|
||||
"qdrant-client>=1.13.2",
|
||||
"cryptography>=42.0.0",
|
||||
"kubernetes>=29.0.0",
|
||||
"maxminddb>=3.1.1",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
|
||||
Reference in New Issue
Block a user