Location oracle is a REST service providing information of the IP and country in the mysterium.network
Have a redis running locally on 6379 (or specify via the appropriate flags).
mage build
./build/loco -maxMindEndpoint=https://geoip.maxmind.com/geoip/v2.1/insights/ -maxMindUsername=username -maxMindPassword=pass -authorizedUsername=user -authorizedPassword=pass
The following flags are available while starting the service:
| flag | type | default value | required | description |
|---|---|---|---|---|
| maxMindEndpoint | string | none | true | specifies the MaxMind endpoint |
| swaggerHost | duration | localhost:8080 | false | specifies the host that the swagger docs will call when executing an example |
| maxMindUsername | string | none | true | MaxMind username |
| maxMindPass | string | none | true | MaxMind password |
| maxMindTimeout | duration | 2s | false | specifies the time period for MaxMind queries |
| redisEndpoint | string | localhost:6379 | false | specifies the redis endpoint |
| redisPassword | string | false | specifies the redis password | |
| cacheExpiry | duration | 7 days | false | specifies the time that the location info will be cached for |
| authorizedUsername | string | true | specifies the username of the authorized usernames for queries on arbitrary IPs | |
| authorizedPassword | string | true | specifies the password of the authorized usernames for queries on arbitrary IPs |
Swagger docs are automatically generated by the given annotations and available at the root of the service. For an example annotation, see the location handler.
Content type
Image
Digest
sha256:73d5383f3…
Size
16.2 MB
Last updated
9 months ago
docker pull mysteriumnetwork/location-oracle:1.7.0