Skip to content

Refactor quic setup #34877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 3, 2021
Merged

Refactor quic setup #34877

merged 10 commits into from
Aug 3, 2021

Conversation

Tratcher
Copy link
Member

This works to improve the user experience around enabling and configuring Http3 and Quic.

  • Kestrel now has a direct dependency on the quic transport
  • UseQuic is now called automatically, but no-ops on platforms where it's not supported.
  • The Alpn setting has been removed from QuicTransportOptions and is now passed directly on SslApplicationProtocol
  • QuicTransportOptions.IdleTimeout defaults to 2 minutes because a non-zero default is required by System.Net.Quic.
  • Enabling Http/3 no-ops under several conditions, similar to HTTP/2:
    • If Http1 is enabled without Tls
    • If Http1 or 2 is enabled with Tls and the the platform does not support Quic.
  • Enabling Http/3 throws if it's enabled without a fallback and either Tls is not used or Quic is not supported.
  • I've added an HttpClient project for local testing since browsers do not support local testing.

Contributes to #34858, #34517

@Tratcher Tratcher added this to the 6.0-rc1 milestone Jul 30, 2021
@Tratcher Tratcher requested review from JamesNK and wtgodbe July 30, 2021 05:10
@Tratcher Tratcher self-assigned this Jul 30, 2021
@Tratcher Tratcher force-pushed the tratcher/quic/setup branch from 63587d2 to 17e7dee Compare August 2, 2021 17:24
@Tratcher Tratcher requested review from JamesNK and wtgodbe August 2, 2021 21:25
@@ -29,6 +29,7 @@ public static class WebHostBuilderKestrelExtensions
/// </returns>
public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder)
{
hostBuilder.UseQuic();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So anyone using Kestrel will be using Quic, even if not using Http3? Does it no-op for Http1/2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this adds the services but they're only used if you enable http3.

@Tratcher Tratcher enabled auto-merge (squash) August 2, 2021 23:38
@Tratcher Tratcher merged commit 90327cd into dotnet:main Aug 3, 2021
@Tratcher Tratcher deleted the tratcher/quic/setup branch August 3, 2021 19:21
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants