Versions in this module Expand all Collapse all v0 v0.0.2 Oct 26, 2023 Changes in this version + const DefaultServerAddr + const DefaultSoftwareName + type BehaviorType int + const BehaviorTypeAddr + const BehaviorTypeAddrAndPort + const BehaviorTypeEndpoint + const BehaviorTypeUnknown + func (natBhType BehaviorType) String() string + type Client struct + func NewClient() *Client + func NewClientWithConnection(conn net.PacketConn) *Client + func (c *Client) BehaviorTest() (*NATBehavior, error) + func (c *Client) Discover() (NATType, *Host, error) + func (c *Client) Keepalive() (*Host, error) + func (c *Client) SetLocalPort(port int) + func (c *Client) SetServerAddr(address string) + func (c *Client) SetServerHost(host string, port int) + func (c *Client) SetSoftwareName(name string) + func (c *Client) SetVVerbose(v bool) + func (c *Client) SetVerbose(v bool) + type Host struct + func (h *Host) Family() uint16 + func (h *Host) IP() string + func (h *Host) Port() uint16 + func (h *Host) String() string + func (h *Host) TransportAddr() string + type Logger struct + func NewLogger() *Logger + func (l *Logger) Debug(v ...interface{}) + func (l *Logger) Debugf(format string, v ...interface{}) + func (l *Logger) Debugln(v ...interface{}) + func (l *Logger) Info(v ...interface{}) + func (l *Logger) Infof(format string, v ...interface{}) + func (l *Logger) Infoln(v ...interface{}) + func (l *Logger) SetDebug(v bool) + func (l *Logger) SetInfo(v bool) + type NATBehavior struct + FilteringType BehaviorType + MappingType BehaviorType + func (natBehavior NATBehavior) NormalType() string + type NATType int + const NATBlocked + const NATError + const NATFull + const NATNone + const NATPortRestricted + const NATRestricted + const NATSymetric + const NATSymetricUDPFirewall + const NATSymmetric + const NATSymmetricUDPFirewall + const NATUnknown + const SymmetricUDPFirewall + func (nat NATType) String() string