fastupnp
fastupnp is the fastest UPnP library for Go, which allows you to open and close ports on your router!
Also, you can see your public address :)
This project was inspired by goupnp and
go-ssdp
Installation
go get -u github.com/alex-gubin/fastupnp
Usage
import "github.com/alex-gubin/fastupnp"
//initializes internet gateway device
device := fastupnp.InitDevice()
// forward port
description := "test"
port := 9999
device.Forward(port, description)
// close port
device.Close(port)
// get your public ip
ip := device.PublicIP()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
MIT