title: How to use openvpn in nodejs?
body: <p>I have NodeJS App and want to start use OpenVPN connection in it.
  To do that I found 2 modules on npm (openvpn-client and openvpn-bin) - but any of them has no good docs and examples, but I try as I can to use them and it was unsuccessful.</p>
  
  <p>I have Ipvanish account (login/password) with 540 .opvn files, which I can use. I try this:</p>
  
  <pre><code>var openvpnmanager = require('node-openvpn');
   var openvpnBin = require('openvpn-bin');
   var path = require('path');
  
   var filePath = path.normalize('../geo/ipvanish/ipvanish-AU-Sydney-syd-a16.ovpn');
  
      var opts = {
          host: 'syd-a16.ipvanish.com', // normally '127.0.0.1', will default to if undefined
          port: 443, //port openvpn management console
          timeout: 60000, //timeout for connection - optional, will default to 1500ms if undefined
          config: filePath
      };
      var auth = {
          user: 'email@gmail.com',
          pass: 'password'
      };
  
      var openvpn = openvpnmanager.connect(opts)
  
      openvpn.on('connected', function() { 
          // will be emited on successful interfacing with openvpn instance
          console.log('connected')
          openvpnmanager.authorize(auth).then(function(res){
  
          });
      });
  </code></pre>