Run NodesReference
nat
Package nat
import "github.com/luxfi/node/nat"Types
Mapper
Mapper attempts to open a set of ports on a router
func NewPortMapper(log log.Logger, r Router) *Mapperfunc (m *Mapper) Map(
intPort uint16,
extPort uint16,
desc string,
ip *utils.Atomic[netip.AddrPort],
updateTime time.Duration,
)func (m *Mapper) UnmapAllPorts()Router
Router describes the functionality that a network device must support to be able to open ports to an external IP.
func GetRouter() Routerfunc NewNoRouter() Router