nim-libp2p icon indicating copy to clipboard operation
nim-libp2p copied to clipboard

Quic transport support

Open Menduist opened this issue 9 months ago • 0 comments

The main blocker here is the TLS layer. We need a TLS library that supports QUIC, which requires, among other things TLS 1.3

BearSSL still doesn't support TLS 1.3 MbedTLS (that we use for webrtc) will soon support TLS 1.3, but the Quic API isn't on their roadmap (follow progress here https://github.com/Mbed-TLS/mbedtls/issues/4731) OpenSSL apparently plans not to expose a QUIC TLS layer, but fully reimplement QUIC for some reason

So we either need to wait for one of those to support Quic, or wrap a new TLS library for Quic We already have nim-quic which was never used in production, but works in tests. It wraps ngtcp2 (you'll also find a list of supported TLS librairies in the README of this repo)

I originally planned to implement Quic without encryption in the meantime, but never finished it: https://github.com/status-im/nim-libp2p/pull/725 Quic implementation in libp2p is similar to WebRTC, since Quic provides its own encryption & muxing.

So, to-do:

  • Review & fix some issues in nim-quic: https://github.com/status-im/nim-quic/issues/37
  • Optionally, merge a encryption-less version: https://github.com/status-im/nim-libp2p/pull/725
  • Wait for mbed or bear to support Quic, or wrap new TLS library
  • Implement it in nim-quic

libp2p specs: https://github.com/libp2p/specs/tree/master/quic

Menduist avatar Oct 12 '23 10:10 Menduist