This is a utility for efficiently using the iptoasn.com GeoIP data in Go programs, by converting the raw .tsv data to the mmdb format (MaxMind DB File Format). It uses the maxmind/mmdbwriter library for the mmdb conversion.
- Installation -
go install github.com/case/iptoasn-go/cmd/[email protected] - Usage -
iptoasn --download -o iptoasn.mmdb- downloads and converts the defaultip2asn-combined.tsv.gzfile - Use the resulting
.mmdbfile in your Go programs, via theoschwald/geoip2-golanglibrary
Minimum Go version supported - 1.24 (as required by maxmind/mmdbwriter)
IPtoASN supported files:
ip2asn-combined.tsv.gzip2asn-v4.tsv.gzip2asn-v6.tsv.gzip2country-v4.tsv.gzip2country-v6.tsv.gz
- Frank Denis, for providing the
iptoasn.comdata service - MaxMind, for the
mmdbfile format, and the read & write Go code - Julia Evans, for her explorations in the space