nat

package
v0.0.0-...-e795a0a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

IsPrivateIP returns whether or not an IP is within a private range.

Types

type Provider

type Provider interface {
	ExternalIP() (net.IP, error)
	AddMapping(protocol string, externalPort, internalPort uint16, expiry time.Duration) error
	DeleteMapping(protocol string, externalPort, internalPort uint16) (err error)
}

Provider represents a barebones generic interface to a NAT traversal network protocol.

func NewPMP

func NewPMP() Provider

func NewUPnP

func NewUPnP() Provider

Jump to

Keyboard shortcuts

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