Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/FarhadF/geoip-server
No bullshit blazing fast geoip server
https://github.com/FarhadF/geoip-server
geoip golang http server
Last synced: 9 days ago
JSON representation
No bullshit blazing fast geoip server
- Host: GitHub
- URL: https://github.com/FarhadF/geoip-server
- Owner: FarhadF
- License: apache-2.0
- Created: 2019-02-06T21:02:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-24T17:09:03.000Z (about 3 years ago)
- Last Synced: 2024-05-04T04:33:41.972Z (6 months ago)
- Topics: geoip, golang, http, server
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - geoip-server - No bullshit blazing fast geoip server (Go)
README
# geoip-server
No bullshit blazing fast geoip server## Usage:
1. Sign up(free) for maxmind [geolite2 (city)](https://dev.maxmind.com/geoip/geoip2/geolite2/) database.
2. Login and go to my licenses and generate a new license(free).
3. Build : ```go build geoip.go```
3. use the flags to provide token and accountid from previous step and run.
4. if you are using default routeprefix try: ```curl localhost:8080/geoip/json/50.19.0.1```
```
geoip:
-a, --accountid int sign up and generate this at maxmind website
-b, --bindip string the ip address to bind to (default "0.0.0.0")
-e, --edition string edition of database to download (default "GeoLite2-City")
-l, --license string sign up and generate this at maxmind website
-p, --port string port to listen on (default "8080")
-r, --routeprefix string route prefix for geoip service, cant be empty (default "/geoip")
-u, --updateinterval int intervals (hour) to check for database updates (default 24)
```## Docker:
1. Clone the repository
2. ```docker build . -t geoip-server```
3. ```docker run -p 8080:8080 geoip-server /geoip -l -a ```
4. ```curl localhost:8080/geoip/json/50.19.0.1```