项目作者: FarhadF

项目描述 :
No bullshit blazing fast geoip server
高级语言: Go
项目地址: git://github.com/FarhadF/geoip-server.git
创建时间: 2019-02-06T21:02:15Z
项目社区:https://github.com/FarhadF/geoip-server

开源协议:Apache License 2.0

下载


geoip-server

No bullshit blazing fast geoip server

Usage:

  1. Sign up(free) for maxmind geolite2 (city) database.
  2. Login and go to my licenses and generate a new license(free).
  3. Build : go build geoip.go
  4. use the flags to provide token and accountid from previous step and run.
  5. if you are using default routeprefix try: curl localhost:8080/geoip/json/50.19.0.1
    1. geoip:
    2. -a, --accountid int sign up and generate this at maxmind website
    3. -b, --bindip string the ip address to bind to (default "0.0.0.0")
    4. -e, --edition string edition of database to download (default "GeoLite2-City")
    5. -l, --license string sign up and generate this at maxmind website
    6. -p, --port string port to listen on (default "8080")
    7. -r, --routeprefix string route prefix for geoip service, cant be empty (default "/geoip")
    8. -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 <license token> -a <accountid>
  4. curl localhost:8080/geoip/json/50.19.0.1