Skip to content

egress: read the country database from lanterngeo.lantern.io - #457

Merged
myleshorton merged 1 commit into
mainfrom
afisk/geo-from-lanterngeo
Oct 8, 2026
Merged

myleshorton merged 1 commit into
mainfrom
afisk/geo-from-lanterngeo

Conversation

@myleshorton

@myleshorton myleshorton commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Why

The egress tags donor traffic with a country from MaxMind's GeoLite2 Country database. Its default source is the lanterngeo GCS bucket. The refresh job and every other reader now use lanterngeo.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

  • Default URL: defaultGeoDBURL is now https://lanterngeo.lantern.io/GeoLite2-Country.mmdb.tar.gz. A GEODB environment variable still overrides it.
  • Still the same source as lantern-cloud. The comment says this is the URL lantern-cloud's maxmind package uses, which is true again since #3542.
  • Still public and keyless. The URL has no license key, and the object is anonymously readable.
  • Test comment now names the new URL. I checked the archive there: its members are GeoLite2-Country_20261006/{GeoLite2-Country.mmdb,COPYRIGHT.txt,LICENSE.txt}, which is what TestDefaultGeoDBURL expects.

Tests

go test ./egress/ passes.

Pre-PR review (local Codex gate)

  • Rounds: 1. Final: CODEX GATE: verdict=approve critical=0 important=0 minor=0 reviewed=7
  • Exit: approve
  • Fixed: none
  • Dismissed: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01EpEDo42eAorMVquPHGmAT6

Summary by CodeRabbit

  • Updates
    • GeoLite database downloads now use Lantern’s hosted mirror instead of Google Cloud Storage. This changes the source used to retrieve geographic data; no other user-facing changes are included.

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
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:37
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 46e6e1c0-94dd-42de-a4d3-cd7b16e99edb
📥 Commits

Reviewing files that changed from the base of the PR and between 06579d8 and eb1b7c1.

📒 Files selected for processing (2)
  • egress/geo.go
  • egress/stats_test.go
 _______________________________________
< Feature flags up; bug sightings down. >
 ---------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@myleshorton
myleshorton merged commit f7fba79 into main Oct 8, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants