Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 601 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 601 Bytes

Turbo-UPnP

Go Reference

Installation

Remember to enable UPnP on your router!

go get -u github.com/DeNetPRO/turbo-upnp

Usage

import upnp "github.com/DeNetPRO/turbo-upnp"

//initializes internet gateway device
device := upnp.InitDevice()

// forward port
description := "test"
port := 9999
device.Forward(port, description)

Image alt

// close port 
device.Close(port)

// get your public ip 
ip := device.PublicIP()