mirror of
https://github.com/cmur2/openvpn-status-web.git
synced 2025-09-28 21:52:05 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
563fb5743b | |||
a852aa4b4d | |||
d5f8d66422 | |||
f873d8176e | |||
c14d59e0bf |
16
README.md
16
README.md
@@ -4,12 +4,10 @@
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Small (another word for naive in this case, it's simple and serves my needs) [Rack](http://rack.github.com/) application providing the information the [OpenVPN](http://openvpn.net/index.php/open-source.html) server collects in it's status file especially including a list of currently connected clients (common name, remote address, traffic, ...).
|
Small (another word for naive in this case, it's simple and serves my needs) [Rack](http://rack.github.com/) application providing the information an [OpenVPN](http://openvpn.net/index.php/open-source.html) server collects in it's status file especially including a list of currently connected clients (common name, remote address, traffic, ...).
|
||||||
|
|
||||||
It lacks:
|
It lacks:
|
||||||
|
|
||||||
* tracking multiple status at the same time
|
|
||||||
* newer status file versions than v1
|
|
||||||
* caching (parses file on each request, page does auto-refresh every minute as OpenVPN updates the status file these often by default)
|
* caching (parses file on each request, page does auto-refresh every minute as OpenVPN updates the status file these often by default)
|
||||||
* management interface support
|
* management interface support
|
||||||
* *possibly more...*
|
* *possibly more...*
|
||||||
@@ -31,9 +29,15 @@ user: "nobody"
|
|||||||
group: "nogroup"
|
group: "nogroup"
|
||||||
# logfile is optional, logs to STDOUT else
|
# logfile is optional, logs to STDOUT else
|
||||||
logfile: "openvpn-status-web.log"
|
logfile: "openvpn-status-web.log"
|
||||||
# display name for humans and the status file path
|
# hash with each VPNs display name for humans as key and further config as value
|
||||||
name: "My Small VPN"
|
vpns:
|
||||||
|
My Small VPN:
|
||||||
|
# the status file path and status file format version are required
|
||||||
|
version: 1
|
||||||
status_file: "/var/log/openvpn-status.log"
|
status_file: "/var/log/openvpn-status.log"
|
||||||
|
My Other VPN:
|
||||||
|
version: 3
|
||||||
|
status_file: "/var/log/other-openvpn-status.log"
|
||||||
```
|
```
|
||||||
|
|
||||||
Your OpenVPN configuration should contain something like this:
|
Your OpenVPN configuration should contain something like this:
|
||||||
@@ -45,6 +49,8 @@ status-version 1
|
|||||||
# ...snip...
|
# ...snip...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For more information about OpenVPN status file and version, see their [man page](https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage). openvpn-status-web is able to parse all versions from 1 to 3.
|
||||||
|
|
||||||
## Advanced topics
|
## Advanced topics
|
||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
@@ -8,7 +8,7 @@ require 'yaml'
|
|||||||
require 'rack'
|
require 'rack'
|
||||||
require 'erb'
|
require 'erb'
|
||||||
require 'metriks'
|
require 'metriks'
|
||||||
require 'better_errors'
|
require 'better_errors' if ENV['RACK_ENV'] == "development"
|
||||||
|
|
||||||
require 'openvpn-status-web/status'
|
require 'openvpn-status-web/status'
|
||||||
require 'openvpn-status-web/parser/v1'
|
require 'openvpn-status-web/parser/v1'
|
||||||
@@ -120,6 +120,10 @@ module OpenVPNStatusWeb
|
|||||||
OpenVPNStatusWeb.logger.info "Quitting..."
|
OpenVPNStatusWeb.logger.info "Quitting..."
|
||||||
Rack::Handler::WEBrick.shutdown
|
Rack::Handler::WEBrick.shutdown
|
||||||
end
|
end
|
||||||
|
Signal.trap('TERM') do
|
||||||
|
OpenVPNStatusWeb.logger.info "Quitting..."
|
||||||
|
Rack::Handler::WEBrick.shutdown
|
||||||
|
end
|
||||||
|
|
||||||
Rack::Handler::WEBrick.run app, :Host => config['host'], :Port => config['port']
|
Rack::Handler::WEBrick.run app, :Host => config['host'], :Port => config['port']
|
||||||
end
|
end
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
module OpenVPNStatusWeb
|
module OpenVPNStatusWeb
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.1.0"
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user