* noise: make it possible for the server to send early data
* noise: use separate early data handlers for initiator and responder
* noise: use a 2 kb buffer for all handshake operations
* Add comments around EarlyData(Handler)
* noise: send early data with 2nd and 3rd handshake message
* Update p2p/security/noise/session_transport.go
Co-authored-by: Marco Munizaga <git@marcopolo.io>
With WebTransport's /webtransport/certhash/xyz addresses, the assumption that
the last component of a multiaddr identifies the transport to use for dialing
doesn't hold any more.
Note that WebRTC will probably also use the certhash multiaddr component to
encode its certificate hashes.
* 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>
* Configure protocolVersion for Identify protocol
Allows the protocolVersion field of the Idenfity protocol to be
configured on the host. The current value is fixed for what appears to
be for backwards compatibility with IPFS which makes it difficult for
non-IPFS protocols to use the library.
References:
- https://github.com/libp2p/go-libp2p/issues/714
- https://github.com/libp2p/go-libp2p/pull/1137
- 6855ab943b/protocols/identify/src/identify.rs (L125-L127)
* Fix protocol version assignment
Fix an issue where the protocolVersion string for the Identify protocol
was wrongly being assigned the agentVersion string.
* Delete trailing whitespace