* move host/relay to host/autorelay
* move autorelay wrapper host to package
* support v2 relays in autorelay
* test autorelay with both v1 and v2 relays
* fix test race
* go mod tidy examples/pubsub/chat
static checker complains; sigh.
* refactor reservation refresh loop
* merge background and refresh goroutines
* handle pushes synchronously from reservation refresh failures
* make connmanager tag a package level constant
* dont sleep to wait for identify, use IdentifyWait
* make relay protocol ids package-level constants
* add comment about v1 relays not having reservations
* use errgrp instead of WaitGroup with atomic int
* fix variable capture bug
* go get x/sync
* add circuitv1 protobuf
* add implementation of v1 circuit relay
Intended to be used by standalone daemons and tests
* remove references to go-libp2p-circuit from production code
* update tests to use the in-tree v1 Relay
* use go-log/v2 in relay v1 impl
* use in-tree v1 relay in relay example
* remove go-libp2p-circuit dep from examples go.mod, go mod tidy
* hole punching protocol
* implement the new retry logic (opening a new stream per hole punch)
* rename the holepunch.HolePunchService to holepunch.Service
* remove stream handler when closing
* remove misleading comment from protobuf, add link to spec
* remove unnecessary netNotifiee.HolePunchService
* simplify receiving from the timer channel
* don't defer the closing of the hole punching stream
* only accept hole punch streams from relayed peers
* refactor error logging
* fix incorrect counting of incoming hole punch attempts
* rename HolePunch to DirectConnect
* fix usage of the wait group to close the hole punch service
* use a gc to the garbage collect the holepunch tracer
* check directionality of connection when accepting the hole punch stream
* add comment why we only call Connect once
* move deduplication logic to the holepunch service
Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com>
* move the current mdns discovery implementation to discovery_legacy
* use libp2p/zeroconf for mDNS discovery
* rename the discovery package to mdns
* don't store the context
* use a wait group for clean shutdown of the mdns resolver
* add comment about port numbers
* move the mdns packages p2p/discovery
* base limits on reservations issued
* switch default reservation limits per peer and per IP
* don't export the constructor for relay.constraints
* panic when reading from crypto/rand fails
* optimize IP-based reservation lookup
* use lists instead of maps to save reservations
* save expiry timestamp in reservations
* use slices instead of linked lists for reservations
* remove unused rand in constraints