noise: github.com/perlin-network/noise/nat Index | Files

package nat

import "github.com/perlin-network/noise/nat"

Index

Package Files

mod.go pmp.go upnp.go

func IsPrivateIP Uses

func IsPrivateIP(ip net.IP) bool

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

type Provider Uses

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 Uses

func NewPMP() Provider

func NewUPnP Uses

func NewUPnP() Provider

Package nat imports 9 packages (graph) and is imported by 1 packages. Updated 2019-02-19. Refresh now. Tools for package owners.