Socket
Socket
Sign inDemoInstall

vpnc

Package Overview
Dependencies
12
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vpnc

Cisco VPN connector / vpnc wrapper


Version published
Weekly downloads
16
decreased by-27.27%
Maintainers
1
Install size
626 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 10 Apr 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc