* Revert "transport.Listener returns a list of multiaddrs"
This reverts commit 8962b2ae33.
* Support multiple QUIC versions on the same listener
* No long running accept loop
* Don't use a goroutine
* PR comments
* transport.Listener returns a list of multiaddrs
* Support both QUIC versions in QUIC transport
* Support only QUIC v1 in webtransport
* Update dialMatcher
* Update tests
* Only use draft 29 when dialing if the server is a draft 29 server
* Removes QUIC draft 29 addrs if we have a QUIC v1 addr
* Lint fix
* Add changes to deterministic certhashes after rebase
* Update p2p/transport/quic/options.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update p2p/transport/quic/listener.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Update p2p/transport/quic/quic_multiaddr.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Stylize QUIC correctly
* Update doc around ListenClose
* Preallocate a bit extra to avoid paying for an allocation later
* Keep a list of multiaddrs, then join
* PR nits
* Close transport or listener just once
* Update go-multiaddr
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Add Resolver interface to transport
* Move resolve test to swarm_dial_test
* Use proper peer id in test
* Only import go-multiaddr once
* Cleanup
* Use SNI in websocket
* Update go-multiaddr
* Update p2p/net/swarm/swarm.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* PR comments on websocket.go
* Use unresolved/resolved map
* Set sni
* Refactor websocket multiaddr parsing code, add server test
* Delete superflous helpers
* Update callsites
* Fix typo in p2p/transport/websocket/websocket.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
addConn is called both when we add a dialed and an accepted connection to the
swarm. InterceptAddrDial is only supposed to intercept outgoing connections
though. When dialing, we already call InterceptAddrDial when we compose the
list of dialable addresses.
It's impossible to run two nodes on the same IP:port, so we know for
sure that any dial to an address that we're listening on will fail (as
the peer IDs won't match).
In practice, this will be most useful for preventing dials to localhost
for nodes that are listening on the default port.
When we close a connection, we set the "stream" set to nil to avoid opening new
stream. Unfortunately, this meant we wouldn't decrement the reference count on
the swarm.
Removes:
* go-libp2p-conn logic (moved to transports)
* go-libp2p-peerstream (moved here)
Changes:
* New transport interface.
* Explicit over implicit (the implicit automagic now all lives in go-libp2p):
* No more default transports, muxers, etc.
* No more fallback dialer. Transports are now *required*.
* Stream opening:
* Connection picking logic (instead of just picking the first).
* Tries harder to open a stream of some connections happen to be closed.
* Stream closing:
* No longer treats half-closed streams as fully closed. Users *must* read the
an EOF or reset the stream for it to be garbage collected.
* No more polling for dead connections.
* Multiplexers are now *non-optional*. Really, they haven't been optional for a
while but we still pretended that they were.
* No more Network type alias. It added a bunch of code and didn't really provide
anything but an alternative set of methods that do the same thing.
* Notifications:
* New guarantee: connection open notifications will complete before connection
close notifications begin.
* Given that, notifications are now delivered in parallel. No more
notification backlogs blocking connection closing/opening.