node-vpn-daemon
v0.0.17
Published
OpenVpn Daemon, to be used with node-vpn-client.
Downloads
17
Readme
node-vpn-daemon
Starts a Openvpn daemon from a node.js program. To be used with the node-vpn-client.
Quick start
npm install node-vpn-daemon
import Daemon from 'node-vpn-daemon'
const daemon = new Daemon({
// params
// ovpnFiles: Array of strings with the location of the ovpn files (server will be selected randomly from array at every start)
// host: manager host default 127.0.0.1
// port: manager port default 1337
// wait: miliseconds for the program to wait after each command default 5000
})
daemon.isRunning().then(isRunning => {
if (isRunning) {
daemon.kill()
} else {
daemon.start()
}
})