upnp

package
v0.0.0-...-a53552e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouterClient

type RouterClient interface {
	AddPortMapping(string, uint16, string, uint16, string, bool, string, uint32) error
	GetExternalIPAddress() (string, error)
	DeletePortMapping(string, uint16, string) error
	LocalAddr() net.IP
}

type UPnPManager

type UPnPManager struct {
	// contains filtered or unexported fields
}

func Get

func Get() *UPnPManager

func Init

func Init(ctx context.Context) (*UPnPManager, error)

func (*UPnPManager) ExternalIP

func (u *UPnPManager) ExternalIP() (string, error)

func (*UPnPManager) ForwardPort

func (u *UPnPManager) ForwardPort(port uint16, description string) error

func (*UPnPManager) RemovePort

func (u *UPnPManager) RemovePort(port uint16)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL