- Install golang https://golang.org/doc/install
go get github.com/vidmed/detection
cd $GOPATH/src/github.com/vidmed/detection/cmd
go build && ./cmd -config=config.toml
ORgo install && cmd -config=config.toml
- ListenAddr - address used by web server to listen to
- ListenPort - port used by web server to listen to
- LogLevel - logging level (panic = 0, fatal = 1, error = 2, warning = 3, info = 4, debug = 5)
- MaxMinDBPath - path to country db file used by MaxMind to detect country using IP
- FiftyOneDegreesDBPath - path to db file used by FiftyOneDegrees to parse user agent data
Default databases for MaxMind and FiftyOneDegrees located in data
folder.
They are free and do not provide all necessary information. For production use please obtain commercial databases.