1
0
Fork 0
mirror of synced 2024-11-22 00:35:36 -05:00
This commit is contained in:
Ilya Sosnovsky 2021-02-20 16:40:14 +03:00
parent 3db757659a
commit a1c0bb6b4b
4 changed files with 32 additions and 22 deletions

View file

@ -3,23 +3,33 @@
usage: openvpn-admin [<flags>]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--listen.host="0.0.0.0" host(s) for openvpn-admin
--listen.port="8080" port for openvpn-admin
--role="master" server role master or slave
--master.host="http://127.0.0.1" url for master server
--master.basic-auth.user="" user for basic auth on master server url
--master.basic-auth.password="" password for basic auth on master server url
--master.sync-frequency=600 master host data sync frequency in seconds.
--master.sync-token=TOKEN master host data sync security token
--ovpn.host=HOST:PORT ... host for openvpn server
--ovpn.network="172.16.100.0/24" network for openvpn server
--mgmt.host="127.0.0.1" host for openvpn server mgmt interface
--mgmt.port="8989" port for openvpn server mgmt interface
--easyrsa.path="/mnt/easyrsa" path to easyrsa dir
--help Show context-sensitive help (also try --help-long and --help-man).
--listen.host="0.0.0.0" host for openvpn-admin
--listen.port="8080" port for openvpn-admin
--role="master" server role master or slave
--master.host="http://127.0.0.1"
url for master server
--master.basic-auth.user="" user for basic auth on master server url
--master.basic-auth.password=""
password for basic auth on master server url
--master.sync-frequency=600 master host data sync frequency in seconds.
--master.sync-token=TOKEN master host data sync security token
--ovpn.server=HOST:PORT ... host(s) for openvpn server
--ovpn.network="172.16.100.0/24"
network for openvpn server
--mgmt=main=127.0.0.1:8989 ...
comma separated (alias=address) for openvpn servers mgmt interfaces
--metrics.path="/metrics" URL path for surfacing collected metrics
--easyrsa.path="/mnt/easyrsa" path to easyrsa dir
--easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
path to easyrsa index file.
--ccd.path="/mnt/ccd" path to client-config-dir
--static.path="./static" path to static dir
--debug Enable debug mode.
path to easyrsa index file.
--ccd.path="/mnt/ccd" path to client-config-dir
--auth.password Enable additional password authorization.
--auth.db="/mnt/easyrsa/pki/users.db"
Database path fort password authorization.
--static.path="./static" path to static dir
--debug Enable debug mode.
--verbose Enable verbose mode.
--version Show application version.
```

View file

@ -22,7 +22,7 @@ services:
build:
context: .
image: openvpn-admin:local
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7744" --ovpn.server="127.0.0.1:7778" --auth.password
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --auth.password
environment:
- OPVN_SLAVE=1
network_mode: service:openvpn

View file

@ -21,7 +21,7 @@ services:
build:
context: .
image: openvpn-admin:local
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --auth.password
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --auth.password --ovpn.server="127.0.0.1:7777:tcp"
network_mode: service:openvpn
volumes:
- ./easyrsa_master:/mnt/easyrsa

View file

@ -30,7 +30,7 @@ const (
indexTxtDateLayout = "060102150405Z"
stringDateFormat = "2006-01-02 15:04:05"
ovpnStatusDateLayout = "Mon Jan 2 15:04:05 2006"
version = "1.5.0"
version = "1.5.0-fix.1"
)
var (
@ -42,7 +42,7 @@ var (
masterBasicAuthPassword = kingpin.Flag("master.basic-auth.password","password for basic auth on master server url").Default("").String()
masterSyncFrequency = kingpin.Flag("master.sync-frequency", "master host data sync frequency in seconds.").Default("600").Int()
masterSyncToken = kingpin.Flag("master.sync-token", "master host data sync security token").Default("justasimpleword").PlaceHolder("TOKEN").String()
openvpnServer = kingpin.Flag("ovpn.server","comma separated addresses for openvpn servers").Default("127.0.0.1:7777").PlaceHolder("HOST:PORT").Strings()
openvpnServer = kingpin.Flag("ovpn.server","comma separated addresses for openvpn servers").Default("127.0.0.1:7777:tcp").PlaceHolder("HOST:PORT:PROTOCOL").Strings()
openvpnNetwork = kingpin.Flag("ovpn.network","network for openvpn server").Default("172.16.100.0/24").String()
mgmtAddress = kingpin.Flag("mgmt","comma separated (alias=address) for openvpn servers mgmt interfaces").Default("main=127.0.0.1:8989").Strings()
metricsPath = kingpin.Flag("metrics.path", "URL path for surfacing collected metrics").Default("/metrics").String()