Skip to content

Fastest UPnP implementation in Golang. Enable port mapping on your router in few lines of code!

License

Notifications You must be signed in to change notification settings

DeNetPRO/turbo-upnp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()