• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 28902701256
62%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 10:21PM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jul 2026 10:20PM UTC coverage: 62.338% (+0.8%) from 61.499%
28902701256

push

github

rm-hull
feat: migrate geolocation lookup to ipinfo.io with MaxMind support (#177)

* refactor: replace IP2Location with MaxMind GeoIP2

Migrated the geoblock service from `ip2location-go` to `geoip2-golang`
to
improve accuracy and support modern MaxMind database formats.

- Updated `GeoData` structure to map standardized country codes and
ASN/ISP info.
- Refactored `geoBlocker` service to use native `net.IP` parsing.
- Updated `metrics` and `dispatcher` tests to reflect the new API
signature.

* refactor: migrate geolocation lookup to MaxMind

- Replaced IP2Location with `maxminddb-golang/v2` for geolocation and
ASN lookups.
- Updated `GeoData` structure to map to MaxMind database fields.
- Added `dns_provider_count` Prometheus metric to track traffic by ASN
and ISP provider.
- Refactored `GeoIpLookup` service for better type safety and
performance.

```mermaid
sequenceDiagram
    participant App as Application
    participant Geo as GeoIpLookup
    participant DB as MaxMind DB
    App->>Geo: GetAll(ipAddress)
    Geo->>DB: Lookup(ipAddress)
    DB-->>Geo: Decoded GeoData
    Geo-->>App: Return GeoData struct
    App->>Metrics: Record Provider/Country
```

* refactor: migrate geolocation lookup to ipinfo.io

- Replaced IP2Location with ipinfo.io for IP geolocation services.
- Updated database downloader, environment variables, and cron schedule
logic.
- Consolidated country and provider metrics to improve observability and
 reduce cardinality.

* Update internal/geoblock/service.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: rename IP2Location config to IPInfo

Updated configuration flags and environment variables to reflect the
migration from IP2Location to ipinfo.io for GeoIP data.

* refactor: update client metrics delimiter

Change the delimiter used in `TopClients` metric keys from a comma (`,`)

to a pipe (`|`) to prevent parsing conflicts with metadata containing
commas (e.g., ASN n... (continued)

32 of 90 new or added lines in 10 files covered. (35.56%)

3 existing lines in 2 files now uncovered.

1440 of 2310 relevant lines covered (62.34%)

806.2 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
0.0
0.0% internal/geoblock/service.go
15
0.0
0.0% internal/geoblock/update.go
13
59.71
0.0% internal/app.go
4
95.51
-1.83% internal/metrics/request_snapshot.go
3
58.33
-2.54% internal/metrics/stats_collector.go
1
16.22
0.0% internal/downloader/download.go
1
0.0
0.0% main.go

Coverage Regressions

Lines Coverage ∆ File
2
0.0
0.0% internal/geoblock/service.go
1
0.0
0.0% internal/geoblock/update.go
Jobs
ID Job ID Ran Files Coverage
1 28902701256.1 07 Jul 2026 10:21PM UTC 32
62.34
GitHub Action Run
Source Files on build 28902701256
  • Tree
  • List 32
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 674c1bbb on github
  • Prev Build on main (#28902091158)
  • Next Build on main (#29002073467)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc