Tracking: Firefox support for WebTransport transport
A WebTransport multiaddr is used to dial a peer that's listening on a WebTransport address. It takes the form:
/{ip4 or 6 address}/udp/4001/quic-v1/webtransport/certhash/{certhash1}/certhash/{certhash2}/p2p/{peerId}
We acquire the WebTransport multiaddr either out of band or via a message cryptographically signed by the public key that the remote peer ID is derived from.
To connect to the peer we extract the two certhashes from the multiaddr and pass them to the WebTransport constructor as serverCertificateHashes.
Once the connection is established using these hashes, we perform a noise handshake using the remote peer ID to ensure we are talking to the peer we expect to be talking to.
For further information please see the libp2p WebTransport transport spec.
The serverCertificateHashes option is supported in Chromium but it has not yet been implemented in Firefox which at the time of writing throws an error with the message "No support for serverCertificateHashes yet"
We cannot support Firefox until this option is implemented since we rely on this init option as part of our connection protocol.
References:
- libp2p WebTransport overview: https://docs.libp2p.io/concepts/transports/webtransport/
- libp2p WebTransport transport spec: https://github.com/libp2p/specs/blob/master/webtransport/README.md
- W3C WebTransport spec: https://www.w3.org/TR/webtransport/
- Firefox
serverCertificateHashestracking issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1806693