upnp

package
v0.0.0-...-2f1cb99 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIPAndForwardPort

func GetIPAndForwardPort(ctx context.Context) (string, string, error)

Types

type RouterClient

type RouterClient interface {
	AddPortMapping(
		NewRemoteHost string,
		NewExternalPort uint16,
		NewProtocol string,
		NewInternalPort uint16,
		NewInternalClient string,
		NewEnabled bool,
		NewPortMappingDescription string,
		NewLeaseDuration uint32,
	) (err error)

	LocalAddr() net.IP

	GetExternalIPAddress() (
		NewExternalIPAddress string,
		err error,
	)
}

func PickRouterClient

func PickRouterClient(ctx context.Context) (RouterClient, error)

type UPnP

type UPnP struct {
	types.Service
	// contains filtered or unexported fields
}

func Spawn

func Spawn() *UPnP

func (*UPnP) Start

func (u *UPnP) Start() error

func (*UPnP) Stop

func (u *UPnP) Stop() error

Jump to

Keyboard shortcuts

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