Versions in this module Expand all Collapse all v0 v0.0.2-rc1 Jan 27, 2020 v0.0.1 Jan 24, 2020 Changes in this version + const AutoNATProto + var AutoNATBootDelay = 15 * time.Second + var AutoNATIdentifyDelay = 5 * time.Second + var AutoNATRefreshInterval = 15 * time.Minute + var AutoNATRequestTimeout = 30 * time.Second + var AutoNATRetryInterval = 90 * time.Second + func IsDialError(e error) bool + func IsDialRefused(e error) bool + type AmbientAutoNAT struct + func (as *AmbientAutoNAT) ClosedStream(net network.Network, s network.Stream) + func (as *AmbientAutoNAT) Connected(net network.Network, c network.Conn) + func (as *AmbientAutoNAT) Disconnected(net network.Network, c network.Conn) + func (as *AmbientAutoNAT) Listen(net network.Network, a ma.Multiaddr) + func (as *AmbientAutoNAT) ListenClose(net network.Network, a ma.Multiaddr) + func (as *AmbientAutoNAT) OpenedStream(net network.Network, s network.Stream) + func (as *AmbientAutoNAT) PublicAddr() (ma.Multiaddr, error) + func (as *AmbientAutoNAT) Status() NATStatus + type AutoNAT interface + PublicAddr func() (ma.Multiaddr, error) + Status func() NATStatus + func NewAutoNAT(ctx context.Context, logger *zap.Logger, h host.Host, getAddrs GetAddrs) AutoNAT + type Error struct + Status pb.Message_ResponseStatus + Text string + func (e Error) Error() string + func (e Error) IsDialError() bool + func (e Error) IsDialRefused() bool + type GetAddrs func() []ma.Multiaddr + type NATClient interface + DialBack func(ctx context.Context, p peer.ID) (ma.Multiaddr, error) + func NewAutoNATClient(h host.Host, getAddrs GetAddrs) NATClient + type NATStatus int + const NATStatusPrivate + const NATStatusPublic + const NATStatusUnknown