0.0.1 • Published 8 years ago

nat-traverse v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

nat-traverse

NAT traversal by way of UPnP or NAT-PMP

Install

npm install -g nat-traverse

Command Line Usage

punch --private <port> --public <port> --ttl <secs>

API

nat(options, success, error)

Example

var nat = require('nat-traverse')

nat({
  type: 'udp', // tcp or udp - passed to nat-pmp
  private: 22,
  public: 8888,
  ttl: 3600,
  timeout: 3000
}, function(external) {
  console.log('Connected to WAN address: ' + external)
}, function(err) {
  console.log(err);
})