Skip to content

tintfoundation/nat-traverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
})

About

NAT traversal by way of UPnP or NAT-PMP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published