finds.dev← search

// the find

lionsoul2014/ip2region

★ 19,568 · Go · NOASSERTION · updated Sep 2026

Ip2region is an offline IP-to-Region localization library and IP data management framework with both IPv4 and IPv6 supports, 10-microsecond level query efficiency, xdb search client for many programming languages

ip2region is an offline IP-to-region lookup library backed by a custom binary format (xdb) that supports both IPv4 and IPv6, with query clients in a dozen-plus languages. It's for anyone who needs geolocation-by-IP without hitting a network API or running a database — think analytics pipelines, access logs, or CDN routing logic where you can't afford a round trip.

The xdb format is genuinely well thought out: a vector index plus binary search over sorted IP segments gets you 10-microsecond lookups, and you can choose between zero-memory (disk-backed), 512KB vector-cache, or full in-memory modes depending on your latency/RAM tradeoff. Data dedup and segment merging in the maker tooling means the resulting file stays compact even with hundreds of millions of rows. Cross-language parity is real, not aspirational — Go, Java, Rust, C, Python, JS, C#, and more all implement the same searcher/maker split, so you're not stuck if your stack changes.

The bundled data is Chinese-region-detailed and English-only-coarse everywhere else — non-China entries are just Country|Province|City|ISP with much less granularity, and the raw source files are updated irregularly with no committed SLA. If you need current, accurate global data you're pushed toward their commercial offering, which is a reasonable business model but worth knowing upfront rather than discovering after integrating. IPv6 support is inconsistent across the toolchain — the Python and C# maker programs are IPv4-only, so if you need to build/edit your own IPv6 xdb files you're limited to Go, Java, Rust, or C++.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →