Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use .ovpn file in windows using node-openvpn #11

Open
wolvorine1933 opened this issue Feb 26, 2018 · 0 comments
Open

How to use .ovpn file in windows using node-openvpn #11

wolvorine1933 opened this issue Feb 26, 2018 · 0 comments

Comments

@wolvorine1933
Copy link

wolvorine1933 commented Feb 26, 2018

var openvpnmanager = require('node-openvpn')
var openvpnBin = require('openvpn-bin')
var path = require('path')

openvpnBin.initialize('C:/Program Files/OpenVPN/bin/openvpn.exe', {
host: '127.0.0.1',
port: 1337,
config: path.normalize('C:/Users/toshiba/Desktop/client.ovpn')
}).then(function() {
var managerInstance = openvpnmanager.connect({ host: '127.0.0.1', port: 1337 })

managerInstance.on('connected', function() {
managerInstance.authorize({
user: '',
pass: ''
})
})

managerInstance.on('console-output', function(output) {
console.log(output)
})
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant