1.5.0 • Published 6 years ago

nat-upnp-wrapper v1.5.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

#nat-upnp-wrapper This is a wrapper for the nat-upnp module.

##Script Usage

Map port

const mapper = require('nat-upnp-wrapper');
mapper.map(options).then(response => console.log(response.success));

Options:

{
    "port": 80, // or [public,private]
    "ports": [80,443,[8081,8082]], // takes priority
    "protocol": "UDP" // defaults to "TCP"
}

Unmap port

mapper.unmap(options).then(response => ...);

Options

{
    "port": 80,
    "ports": [80,443,8081],
    "protocol": "UDP"
}

Get Mappings

mapper.mappings(true).then(response => console.log(response.results));

Set to true for local results. Defaults to false.

Get Public IP Address

mapper.ip().then(ip => console.log(ip));
1.5.0

6 years ago

1.4.9

6 years ago

1.4.8

6 years ago

1.4.7

6 years ago

1.4.6

6 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.0.0

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago