0.0.1 • Published 8 years ago
nat-traverse v0.0.1
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);
})
0.0.1
8 years ago