0.3.1 • Published 9 months ago

node-portmapping v0.3.1

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
9 months ago

Multi-protocol NAT Port Mapping for Node.js

License: MPL 2.0 NPM package

node-portmapping allows to forward ports on Network Address Translators (NAT). It implements the protocols PCP, NAT-PMP, and UPnP, and automatically detects which one to use.

This project consists in Node.js bindings for libplum, which is licensed under MPL 2.0.

Example

const nodePortMapping = require('node-portmapping');

nodePortMapping.init();

const mapping = nodePortMapping.createMapping(8080, (info) => {
    if (info.state == 'Success') {
        console.log(`${info.externalHost}:${info.externalPort}`);
    }
});

Install

$ npm install node-portmapping
0.3.1

9 months ago

0.3.0

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago