Set up port fwds and find external IP: C++/CMake wrapper for miniupnpc and nat-pmp libs
Fetching latest commit…
Cannot retrieve the latest commit at this time
libportfwd ---------- A basic, lightweight c++ wrapper around miniupnp and nat-pmp libraries for setting up port fwds, 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. 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(); pf.add("192.168.1.2", 1234); // your lan IP, and port to fwd pf.remove(1234); // remove port fwding on exit!