Repository navigation
egress: read the country database from lanterngeo.lantern.io - #457
Merged
Merged
Conversation
lanterngeo.lantern.io is the R2 copy of the MaxMind databases that lantern-cloud's refresh job keeps current. lantern-cloud's maxmind package, lantern-box and http-proxy read it; the GCS bucket this read is being retired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EpEDo42eAorMVquPHGmAT6
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused URL migration preserves existing override and archive-handling behavior without introducing unresolved issues.
0 open findings
What changed in this PR
Updates egress geolocation to read the country database from Lantern’s Cloudflare-backed mirror.
Changes:
- Switches the default GeoDB URL from GCS to
lanterngeo.lantern.io. - Updates the corresponding test documentation.
| File | Description |
|---|---|
egress/geo.go |
Changes the default country database URL. |
egress/stats_test.go |
Updates the verified archive URL comment. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The egress tags donor traffic with a country from MaxMind's GeoLite2 Country database. Its default source is the
lanterngeoGCS bucket. The refresh job and every other reader now uselanterngeo.lantern.io, the R2 copy behind Cloudflare, which getlantern/lantern-cloud#3542 put back in charge. GCS is still written for now, but only until its last readers move; then it stops being updated.What
defaultGeoDBURLis nowhttps://lanterngeo.lantern.io/GeoLite2-Country.mmdb.tar.gz. AGEODBenvironment variable still overrides it.maxmindpackage uses, which is true again since #3542.GeoLite2-Country_20261006/{GeoLite2-Country.mmdb,COPYRIGHT.txt,LICENSE.txt}, which is whatTestDefaultGeoDBURLexpects.Tests
go test ./egress/passes.Pre-PR review (local Codex gate)
CODEX GATE: verdict=approve critical=0 important=0 minor=0 reviewed=7approve🤖 Generated with Claude Code
https://claude.ai/code/session_01EpEDo42eAorMVquPHGmAT6
Summary by CodeRabbit