Skip to content

Conversation

@rzikm
Copy link
Member

@rzikm rzikm commented Oct 28, 2020

This PR adds initial version of almost C#-only QUIC implementation as an alternative to MsQuic based implementation. The work originated as my Master Thesis.

Supported QUIC Protocol Features

This implementation is highly in WIP state. The features are at the draft-27 version. The goal was to obtain a minimal working
implementation able to reliably transmit data between client and server. This can be used to evaluate the viability of purely C# implementation for production releases. Most transport-unrelated features are
left unimplemented.

Currently implemented:

  • Basic connection establishment
  • Encryption
  • TLS integration backed by modified OpenSSL
  • Sending data, flow control, loss recovery, congestion control
  • Stream/Connection termination
  • Coalescing packets into a single UDP datagram

Unsupported QUIC Protocol Features

A list of highlights of unimplemented protocol features follows:

  • Connection migration
  • Stateless reset
  • 0-RTT data
  • Server Preferred Address
  • Version Negotiation
  • Address Validation
  • Encryption key updates

OpenSSL integration

To function correctly, the implementation requires a custom branch of OpenSSL from Akamai
https://github.com/akamai/openssl/tree/OpenSSL_1_1_1g-quic. The implementation tries to detect that
a QUIC-supporting OpenSSL is present in the path. If not, then a mock implementation is used instead.

The mock implementation can be used for trying the implementation locally, but interoperation with other
QUIC implementations is, of course, possible only with the OpenSSL-based TLS. If you want to make sure your
implementation runs with OpenSSL, define the DOTNETQUIC_OPENSSL environment variable. This will
cause the implementation to throw if proper OpenSSL version cannot be loaded.

Tracing and qvis

The implementation can produce traces that can be consumed by https://qvis.edm.uhasselt.be
visualizer. To collect traces, define DOTNETQUIC_TRACE environment variable to something nonempty. The traces will be
saved in the working directory in a file named [timestamp]-[server|client].qvis.

Disabling encryption

Regardless of TLS used, you can circumvent encryption by defining the DOTNETQUIC_NOENCRYPT environment variable to something nonempty.

@Dotnet-GitSync-Bot
Copy link
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Oct 28, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@dnfadmin
Copy link

dnfadmin commented Oct 28, 2020

CLA assistant check
All CLA requirements met.

@rzikm
Copy link
Member Author

rzikm commented Oct 28, 2020

Tagging @karelz and @geoffkizer. Please tag anyone else who may find this PR of interest

@wfurt
Copy link
Member

wfurt commented Oct 28, 2020

@geoffkizer
Copy link
Contributor

Per discussion, let's get this into runtimelabs first.

@rzikm Can you post this PR to https://github.com/dotnet/runtimelab/tree/feature/ManagedQuic?

@rzikm rzikm force-pushed the master-managed-quic branch from c7b9321 to 59a26d6 Compare November 3, 2020 22:26
@rzikm
Copy link
Member Author

rzikm commented Nov 3, 2020

rebased and created separate PR to runtimelabs. I couldn't reuse this PR so I had to create new one.

dotnet/runtimelab#293

Closing this one.

@rzikm rzikm closed this Nov 3, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 6, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants