MCPcopy Index your code
hub / github.com/adolfintel/WaifUPnP

github.com/adolfintel/WaifUPnP @1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.2 ↗ · + Follow
35 symbols 65 edges 5 files 16 documented · 46%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

WaifUPnP

UPnP Port Forwarding for Java couldn't be any easier!

WaifUPnP is an extermely lightweight Java library that allows you to:

  • open/close TCP/UDP ports
  • check if there's an UPnP router available
  • check if a port is already mapped

using literally 1 line of code, as it should be!

It's as easy as:

UPnP.openTCP(<port number here>);

Usage Examples are included.

Usage

To compile, import the project in Netbeans. Alternatively, download the binaries from http://fdossena.com/?p=waifupnp/index.frag

Once you have the .jar files:

  • Import WaifUPnP.jar into your application
  • Optionally, import WaifUPnP-javadoc.jar if you need JavaDoc
  • WaifUPnP-sources.jar contains the source code and should not be imported into your project

Compatibility

Java 6 and newer

Limitations

WaifUPnP is a very basic implementation of UPnP, that only scans for the default gateway, and can only open/close ports.

While this is enough for most people, if you need a full implementation of UPnP, you should take a look at Cling

License

Copyright (C) 2015-2018 Federico Dossena

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/lgpl.

Core symbols most depended-on inside this repo

isUPnPAvailable
called by 10
src/com/dosse/upnp/UPnP.java
command
called by 4
src/com/dosse/upnp/Gateway.java
openPortTCP
called by 2
src/com/dosse/upnp/UPnP.java
gatewayFound
called by 2
src/com/dosse/upnp/GatewayFinder.java
openPort
called by 2
src/com/dosse/upnp/Gateway.java
closePort
called by 2
src/com/dosse/upnp/Gateway.java
isMapped
called by 2
src/com/dosse/upnp/Gateway.java
waitInit
called by 1
src/com/dosse/upnp/UPnP.java

Shape

Method 29
Class 6

Languages

Java100%

Modules by API surface

src/com/dosse/upnp/UPnP.java13 symbols
src/com/dosse/upnp/Gateway.java9 symbols
src/com/dosse/upnp/GatewayFinder.java8 symbols
Example2.java3 symbols
Example1.java2 symbols

For agents

$ claude mcp add WaifUPnP \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact