Fix docs
This commit is contained in:
parent
3db757659a
commit
a1c0bb6b4b
4 changed files with 32 additions and 22 deletions
46
README.md
46
README.md
|
@ -3,23 +3,33 @@
|
||||||
usage: openvpn-admin [<flags>]
|
usage: openvpn-admin [<flags>]
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
--help Show context-sensitive help (also try --help-long and --help-man).
|
--help Show context-sensitive help (also try --help-long and --help-man).
|
||||||
--listen.host="0.0.0.0" host(s) for openvpn-admin
|
--listen.host="0.0.0.0" host for openvpn-admin
|
||||||
--listen.port="8080" port for openvpn-admin
|
--listen.port="8080" port for openvpn-admin
|
||||||
--role="master" server role master or slave
|
--role="master" server role master or slave
|
||||||
--master.host="http://127.0.0.1" url for master server
|
--master.host="http://127.0.0.1"
|
||||||
--master.basic-auth.user="" user for basic auth on master server url
|
url for master server
|
||||||
--master.basic-auth.password="" password for basic auth on master server url
|
--master.basic-auth.user="" user for basic auth on master server url
|
||||||
--master.sync-frequency=600 master host data sync frequency in seconds.
|
--master.basic-auth.password=""
|
||||||
--master.sync-token=TOKEN master host data sync security token
|
password for basic auth on master server url
|
||||||
--ovpn.host=HOST:PORT ... host for openvpn server
|
--master.sync-frequency=600 master host data sync frequency in seconds.
|
||||||
--ovpn.network="172.16.100.0/24" network for openvpn server
|
--master.sync-token=TOKEN master host data sync security token
|
||||||
--mgmt.host="127.0.0.1" host for openvpn server mgmt interface
|
--ovpn.server=HOST:PORT ... host(s) for openvpn server
|
||||||
--mgmt.port="8989" port for openvpn server mgmt interface
|
--ovpn.network="172.16.100.0/24"
|
||||||
--easyrsa.path="/mnt/easyrsa" path to easyrsa dir
|
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"
|
--easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
|
||||||
path to easyrsa index file.
|
path to easyrsa index file.
|
||||||
--ccd.path="/mnt/ccd" path to client-config-dir
|
--ccd.path="/mnt/ccd" path to client-config-dir
|
||||||
--static.path="./static" path to static dir
|
--auth.password Enable additional password authorization.
|
||||||
--debug Enable debug mode.
|
--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.
|
||||||
|
|
||||||
```
|
```
|
|
@ -22,7 +22,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: openvpn-admin:local
|
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:
|
environment:
|
||||||
- OPVN_SLAVE=1
|
- OPVN_SLAVE=1
|
||||||
network_mode: service:openvpn
|
network_mode: service:openvpn
|
||||||
|
|
|
@ -21,7 +21,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: openvpn-admin:local
|
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
|
network_mode: service:openvpn
|
||||||
volumes:
|
volumes:
|
||||||
- ./easyrsa_master:/mnt/easyrsa
|
- ./easyrsa_master:/mnt/easyrsa
|
||||||
|
|
4
main.go
4
main.go
|
@ -30,7 +30,7 @@ const (
|
||||||
indexTxtDateLayout = "060102150405Z"
|
indexTxtDateLayout = "060102150405Z"
|
||||||
stringDateFormat = "2006-01-02 15:04:05"
|
stringDateFormat = "2006-01-02 15:04:05"
|
||||||
ovpnStatusDateLayout = "Mon Jan 2 15:04:05 2006"
|
ovpnStatusDateLayout = "Mon Jan 2 15:04:05 2006"
|
||||||
version = "1.5.0"
|
version = "1.5.0-fix.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -42,7 +42,7 @@ var (
|
||||||
masterBasicAuthPassword = kingpin.Flag("master.basic-auth.password","password for basic auth on master server url").Default("").String()
|
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()
|
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()
|
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()
|
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()
|
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()
|
metricsPath = kingpin.Flag("metrics.path", "URL path for surfacing collected metrics").Default("/metrics").String()
|
||||||
|
|
Loading…
Reference in a new issue