https://github.com/vanng822/geolite2fountries
Scripts for filtering selected countries
https://github.com/vanng822/geolite2fountries
Last synced: 5 months ago
JSON representation
Scripts for filtering selected countries
- Host: GitHub
- URL: https://github.com/vanng822/geolite2fountries
- Owner: vanng822
- License: mit
- Created: 2026-01-10T20:22:08.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-11T12:04:12.000Z (6 months ago)
- Last Synced: 2026-01-11T16:06:27.372Z (6 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geolite2fountries
Scripts for filtering selected countries.
## the use case
maxminddb-golang seems to be quite slow when running on a full version of GeoLite2-Country.mmdb. The use case I have here is only checking if a user is from Vietnam. The service responds much faster with only records for Vietnam.
# Install
```bash
go install -mod=readonly github.com/vanng822/geolite2fountries@latest
```
# Usage
## download
```bash
curl -L -o GeoLite2-Country.mmdb https://github.com/P3TERX/GeoLite.mmdb/releases/latest/download/GeoLite2-Country.mmdb
```
## run filter
`countries` should be a comma-separated list
```bash
geolite2fountries --input ./GeoLite2-Country.mmdb --output ./vietnam_only.mmdb --countries VN
```