Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CRC16("github.com/privatix/dappctrl/nat") = 0x1999 ErrBadMechanism errors.Error = 0x1999<<8 + iota ErrTooShortLifetime ErrLocalAddressNotFound ErrAddMapping ErrNoRouterDiscovered )
Errors.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { CheckTimeout int64 // In milliseconds. MapTimeout int64 // In milliseconds. MapUpdateInterval int64 // In milliseconds. Mechanism string // upnp, pmp or any SoapRequestTimeout int64 // In milliseconds. }
Config is a configuration for service to traversal NAT.
type Interface ¶
type Interface interface { AddMapping(protocol string, extPort, intPort int, name string, lifetime time.Duration) error DeleteMapping(protocol string, extPort, intPort int) error }
Interface an implementation of nat.Interface can map local ports to ports accessible from the Internet.
Click to show internal directories.
Click to hide internal directories.