[UNMAINTAINED] Cisco VPN connector / vpnc wrapper
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-12-02 23:19:48 +01:00
lib Strict mode 2013-04-10 17:20:07 +02:00
test Initial, just some settings generation. 2012-06-16 11:04:20 +02:00
.gitignore Basics for running vpnc. 2012-06-16 11:50:16 +02:00
.travis.yml Dependencies require 0.8, so we might as well. 2012-08-15 16:06:56 +02:00
example.js Function to check if vpnc is available. 2012-06-16 12:23:55 +02:00
LICENSE Relicense as MIT 2012-08-11 12:04:52 +02:00
package.json 1.4.10 2013-04-10 17:20:09 +02:00
README.md This project is unmaintained 2016-12-02 23:19:48 +01:00

This project is not actively maintained

Issues and pull requests on this repository may not be acted on in a timely manner, or at all. You are of course welcome to use it anyway. You are even more welcome to fork it and maintain the results.

Unmaintained

node-vpnc

build status

Use vpnc to connect to a remote Cisco VPN, using a specified configuration.

Example

var vpnc = require('vpnc');

var config = {
    IPSec_ID: 'foobar',
    IPSec_gateway: 'vpn.example.com',
    IPSec_secret: 'topSecret',

    Xauth_username: 'test@example',
    Xauth_password: 'r00barb',

    IKE_Authmode: 'psk',
    IKE_DH_Group: 'dh2',
    DNSUpdate: 'no',
    NAT_Traversal_Mode: 'force-natt',
    Local_Port: 0,
    Cisco_UDP_Encapsulation_Port: 0,
};

vpnc.available(function (err, version) {
    if (err) {
        console.log('VPN unavailable:');
        console.log(err);
    } else {
        console.log('Found ' + version);
        connect();
    }
});

function connect() {
    vpnc.connect(config, function (err, code) {
        if (err) {
            console.log('Error connecting VPN:');
            console.log(err);
        } else {
            console.log('VPN connected. Disconnecting in five seconds.');
            setTimeout(disconnect, 5000);
        }
    });
}

function disconnect() {
    vpnc.disconnect(function (err, code) {
        if (err) {
            console.log('Error disconnecting VPN:');
            console.log(err);
        } else {
            console.log('VPN disconnected.');
        }
    });
}

License

MIT