Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcoin-org/bupnp
UPNP for node.js
https://github.com/bcoin-org/bupnp
Last synced: 6 days ago
JSON representation
UPNP for node.js
- Host: GitHub
- URL: https://github.com/bcoin-org/bupnp
- Owner: bcoin-org
- License: other
- Created: 2017-11-02T14:37:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T19:11:01.000Z (over 5 years ago)
- Last Synced: 2024-09-14T03:17:59.932Z (about 2 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 16
- Watchers: 8
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bupnp
UPNP for node.js.
## Usage
``` js
const UPNP = require('bupnp');
```## API
```javascript
// Set a timeout
UPNP.RESPONSE_TIMEOUT = 1000// Discovering internet gateway (upnp)
let wan = await UPNP.discover()// Find external IP (upnp)
let host = await wan.getExternalIP()// Add port mapping (remoteHost, externalPort, internalPort)
await wan.addPortMapping(host, src, dest)// Remove port mapping
await wan.removePortMapping(host, port)
```## Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. ``## License
- Copyright (c) 2017, Christopher Jeffrey (MIT License).
See LICENSE for more info.