autonat

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 18 Imported by: 11

README

go-libp2p-autonat-svc

Discourse posts

AutoNAT service implementation

Deprecated

This repository is now subsumed within the autonat repo.

Documentation

See https://godoc.org/github.com/libp2p/go-libp2p-autonat-svc.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT


The last gx published version of this module was: 1.0.15: QmS4vFMsoH5BwxfWdMBeMt6sBdcBAB5mik1ATADySymLZW

Documentation

Index

Constants

View Source
const P_CIRCUIT = 290

Variables

View Source
var (
	// AutoNATServiceDialTimeout defines how long to wait for connection
	// attempts before failing.
	// Deprecated - use autonat.config.requestTimeout
	AutoNATServiceDialTimeout = 15 * time.Second
	// AutoNATServiceResetInterval defines how often to reset throttling.
	// Deprecated - use autonat.WithSchedule
	AutoNATServiceResetInterval = 1 * time.Minute
	// AutoNATServiceResetJitter defines the amplitude of randomness in throttle
	// reset timing.
	// Deprecated - use autonat.WithSchedule
	AutoNATServiceResetJitter = 15 * time.Second

	// AutoNATServiceThrottle defines how many times each ResetInterval a peer
	// can ask for its autonat address.
	// Deprecated - use autonat.WithPeerThrottling
	AutoNATServiceThrottle = 3
	// AutoNATGlobalThrottle defines how many total autonat requests this
	// service will answer each ResetInterval.
	// Deprecated - use autonat.WithThrottling
	AutoNATGlobalThrottle = 30
	// AutoNATMaxPeerAddresses defines maximum number of addreses the autonat
	// service will consider when attempting to connect to the peer.
	// Deprecated - use autonat.config.maxPeerAddresses
	AutoNATMaxPeerAddresses = 16
)

Functions

This section is empty.

Types

type AutoNATService

type AutoNATService struct {
	// contains filtered or unexported fields
}

AutoNATService provides NAT autodetection services to other peers Deprecated - use autonat.EnableService

func NewAutoNATService

func NewAutoNATService(ctx context.Context, h host.Host, forceEnabled bool, opts ...libp2p.Option) (*AutoNATService, error)

NewAutoNATService creates a new AutoNATService instance attached to a host Deprecated - use autonat.EnableService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL