A Go program that merges multiple IP geolocation databases into a single, comprehensive MMDB file. The merged database combines the best data from each source using priority-based field-level merging.
| Source | Primary Use | Coverage |
|---|---|---|
| GeoLite2-City | Country, city, coordinates, timezone, subdivisions, multi-language names | IPv4 + IPv6 |
| GeoLite2-ASN | ASN fallback (secondary) | IPv4 + IPv6 |
| IPinfo Lite | ASN, AS organization, AS domain (primary) | IPv4 + IPv6 |
| DB-IP City | Supplementary geo data | IPv4 + IPv6 |
| RouteViews ASN | ASN fallback (tertiary) | IPv4 + IPv6 |
| GeoLite2-Geo-Whois-ASN-Country | Country fallback | IPv4 + IPv6 |
| QQWry (Chunzhen) | Enhanced Chinese IP geolocation with native zh-CN names | IPv4 |
| OpenProxyDB | Proxy, VPN, Tor, hosting, and CDN detection | IPv4 + IPv6 |
The merged database contains the following fields:
{
"city": {
"geoname_id": <uint32>,
"names": { "en": "...", "de": "...", ... }
},
"continent": {
"code": "...",
"geoname_id": <uint32>,
"names": { "en": "...", "de": "...", ... }
},
"country": {
"geoname_id": <uint32>,
"iso_code": "...",
"names": { "en": "...", "de": "...", ... }
},
"location": {
"accuracy_radius": <uint16>,
"latitude": <double>,
"longitude": <double>,
"metro_code": <uint16>,
"time_zone": "..."
},
"postal": {
"code": "..."
},
"registered_country": {
"geoname_id": <uint32>,
"iso_code": "...",
"names": { "en": "...", "de": "...", ... }
},
"subdivisions": [
{
"geoname_id": <uint32>,
"iso_code": "...",
"names": { "en": "...", "de": "...", ... }
}
],
"asn": {
"autonomous_system_number": <uint32>,
"autonomous_system_organization": "...",
"as_domain": "..."
},
"proxy": {
"is_proxy": <bool>,
"is_vpn": <bool>,
"is_tor": <bool>,
"is_hosting": <bool>,
"is_cdn": <bool>,
"is_school": <bool>,
"is_anonymous": <bool>
}
}
Download the latest merged database from Releases:
wget https://github.com/NetworkCats/Merged-IP-Data/releases/latest/download/Merged-IP.mmdb- Go 1.25 or later
git clone https://github.com/NetworkCats/Merged-IP-Data.git
cd Merged-IP-Data
go build -o merge-tool ./cmd/merge# Download databases and merge
./merge-tool
# Use existing downloaded databases
./merge-tool -skip-download
# Custom output path
./merge-tool -output custom.mmdbThe database is automatically updated daily at 1:00 UTC via GitHub Actions. Each release includes:
- The merged MMDB file
- Release notes with data source information
This project merges data from multiple sources. Please refer to each source's license:
- GeoLite2: Creative Commons Attribution-ShareAlike 4.0 International License
- IPinfo Lite: Creative Commons Attribution-ShareAlike 4.0 International License
- DB-IP: CC BY 4.0
- RouteViews ASN: CC0 1.0
- OpenProxyDB: CC0 1.0
The merge tool source code is provided as-is for educational and personal use.