blob: e7e81ea91f6ba4270e20f11e3fe92bee5d8224d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
Menshen
=======================
Menshen is a geolocation and gateway status service for LEAP VPN.
In chinese folk religions, `menshen <https://en.wikipedia.org/wiki/Menshen>`_
are guardians of doors and gates.
The geolocation service provides the remote ip (via X-Forwarded-For header, if
present), country code, city, and geographical coordinates. Information is
provided in plain text format, under ``/``, and in json, under ``/json``.
Menshen will also soon provide a "gateway health" service to help clients choose the
nearest, less congested gateway. This feature is currently undergoing heavy changes.
Prerequisites
-----------------------
You can use ``geoipupdate`` to download MaxMind's City database::
sudo apt install geoipupdate
sudo cp /usr/share/doc/geoipupdate/examples/GeoIP.conf.default /etc/GeoIP.conf
sudo geoipupdate -v
(note: this service now requires a license key)
Usage
-----------------------
-api <tld>
domain for the api. Default: black.riseup.net. It can be also set via MENSHEN_API env var.
-geodb <path>
path to the GeoLite2-City database (default is "/var/lib/GeoIP/GeoLite2-City.mmdb")
-port <port>
port where the service listens on (default is 9001)
-notls
disable TLS on the service
-server_crt string
path to the cert file for TLS
-server_key string
path to the key file for TLS
|