GithubHelp home page GithubHelp logo

skyformat99 / libportfwd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rj/libportfwd

0.0 2.0 0.0 391 KB

Set up port fwds and find external IP: C++/CMake wrapper for miniupnpc and nat-pmp libs

CMake 21.36% C++ 78.64%

libportfwd's Introduction

libportfwd
----------
A basic, lightweight c++ wrapper around miniupnp and nat-pmp libraries
for setting up port fwds, detecting max up/downstream bandwidth, and 
finding out external IP address.

See: http://miniupnp.free.fr/

Designed to wrap up miniupnpc+natpmp libs into a static lib with a small API
so other projects can easily setup port fwds without shipping extra libs/deps.

Should detect any upnp or nat-pmp router and automatically use the appropriate
library under the hood.

Uses cmake to build needed bits of miniupnpc..

NB/TODO
-------
I don't have a nat-pmp capable device (eg: airport express)
so haven't implemented that bit yet. only supports upnp atm.

Usage
-----
See the demo in main.cpp, but here's the jist:

 Portfwd pf;
 pf.init(2000);   // 2000 = ms to wait for response from router
 pf.add(1234);    // port to fwd to you
 pf.remove(1234); // remove port fwding on exit

libportfwd's People

Contributors

rj avatar

Watchers

skyformat99 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.