Registry / networking / nebulouslabs-go-upnp

nebulouslabs-go-upnp

JSON →
library0.0.0-20211002182029-11da932010b6gogounverified

A Go library for UPnP port forwarding and external IP discovery.

go get gitlab.com/NebulousLabs/go-upnp
INSTALL
IMPORT
SIG · NEBULOUSLABS-GO-UP
N
nebulouslabs-go-upnp
networkinggov0.0.0-20211002182029-11da932010b6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

upnp
gitlab.com/NebulousLabs/go-upnp

Discover a UPnP router and get the external IP address.

package main import ( "fmt" "gitlab.com/NebulousLabs/go-upnp" ) func main() { router, _ := upnp.Discover() ip, _ := router.ExternalIP() fmt.Println("External IP:", ip) }
Debug
Known issues
gotchaOnly supports symmetric port forwarding (same internal and external port).
fix
Use the Forward function with the same port for both internal and external.
affects: all
Upgrade
Version history
0.0.0-20211002182029-11da932010b6latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
nebulouslabs-go-upnp — go get nebulouslabs-go-upnp · libregistry