Git Product home page Git Product logo

port_forward_android's Introduction

Port_Forward_Android

Port Forward From Android Device on any Internet Gateway Device (Router) that has the UPNP option enabled. First step in opening a port on a IGD si to enable the UPNP option, for this you need to access the router settings and select this option

Application screenshot:

Main Application Activity

   

Main Application Get External IP and IGD Friendly Name

   

Add Port Activity

For own implementation use upnplib-mobile.jar library.

First the IGD (Internet Gateway Device Router) using the following line of code. InternetGatewayDevice[] internetGatewayDevices = InternetGatewayDevice.getDevices(5000);

If the internetGatewayDevices array is > 1 get the first element and use the following methods.

firstIGDEmelent.addPortMapping(description, externalRouterIP, internalPort, externalRouterPort, internalIP, 0, "TCP");
firstIGDElement.addPortMapping(description, externalRouterIP, internalPort, externalRouterPort, internalIP, 0, "UDP");

Both protocols (TPC & UDP) are required.

This library also has the remove implementation with the following methods.

firstIGDEmelent.deletePortMapping(externalIP, port, "TCP");
firstIGDEmelent.deletePortMapping(externalIP, port, "UDP");

Application developement in progress.

port_forward_android's People

Contributors

manolescusebastian avatar

Stargazers

Knight avatar

Watchers

Knight 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.