No description
Find a file
2025-12-07 23:46:51 +00:00
.github/workflows Move to Forgejo Runner 2025-10-10 21:19:43 +02:00
.gitignore Add .gitignore 2025-07-27 21:08:55 +02:00
geoip_asn.go Update doc 2025-08-01 23:19:53 +02:00
geoip_country.go Update doc 2025-08-01 23:19:53 +02:00
go.mod Update git.gorbe.io/go/geoip to latest 2025-12-07 23:46:51 +00:00
go.sum Update git.gorbe.io/go/geoip to latest 2025-12-07 23:46:51 +00:00
LICENSE Initial commit 2025-07-23 22:42:42 +02:00
README.md Rename Caddy module 2025-07-26 03:59:52 +02:00

geoip

Go Reference Go Report Card

go get git.gorbe.io/caddy/geoip@latest

Get the latest commit (if Go module proxy is not updated):

go get "git.gorbe.io/caddy/geoip@$(curl -s 'https://git.gorbe.io/api/v1/repos/caddy/geoip/commits' | jq -r '.[0].sha')"

GeoLite2 databases

The GeoLite2-Country and GeoLite2-ASN databases are embedded into the resulting binary

Usage

example.com {

    @country-matcher geoip_country "HU" "DE"
    respond @country-mathers "Country matcher"

    @asn-matcher geoip_asn "24940"
    respond @asn-matcher "Hetzner Online GmbH"
}