diff --git a/README.md b/README.md index ecef39a..8f48c46 100644 --- a/README.md +++ b/README.md @@ -3,23 +3,33 @@ usage: openvpn-admin [] 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. + ``` \ No newline at end of file diff --git a/docker-compose-slave.yaml b/docker-compose-slave.yaml index d1d00ae..454d2c8 100644 --- a/docker-compose-slave.yaml +++ b/docker-compose-slave.yaml @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml index 3cb6fef..98873b3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 diff --git a/main.go b/main.go index 2763ea0..0d056ae 100644 --- a/main.go +++ b/main.go @@ -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()