Skip to content

Commit 9587f74

Browse files
authored
Improve version deployment documentation (#4646)
1 parent 709d700 commit 9587f74

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

docs/Deployment.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ MsQuic uses worker threads internally to execute the QUIC protocol logic. For ea
137137

138138
The queue delay threshold can be configured via the `MaxWorkerQueueDelayMs` setting.
139139

140+
## Version Negotiation
141+
142+
MsQuic supports QUIC protocol versions 1 and 2, and the version negotiation extension. By default, version negotiation is off, but can be enabled at runtime.
143+
Instructions for configuring and deploying QUIC versions are at [Versions](Versions.md).
144+
140145
# Diagnostics
141146

142147
For details on how to diagnose any issues with your deployment at the MsQuic layer see [Diagnostics](Diagnostics.md).

docs/Settings.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ While `REG_DWORD` can hold values larger than `uint16_t`, the administrator shou
7474

7575
The following settings are available via registry as well as via [QUIC_VERSION_SETTINGS](./Versions.md):
7676

77-
| Setting | Type | Registry Name | Default | Description |
78-
|-----------------------------------|------------|--------------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|
79-
| Acceptable Versions List | uint32_t[] | AcceptableVersions | Unset | Sets the list of versions that a given server instance will use if a client sends a first flight using them. |
80-
| Offered Versions List | uint32_t[] | OfferedVersions | Unset | Sets the list of versions that a given server instance will send in a Version Negotiation packet if it receives a first flight from an unknown version. This list will most often be equal to the Acceptable Versions list. |
81-
| Fully-Deployed Versions List | uint32_t[] | FullyDeployedVersions | Unset | Sets the list of QUIC versions that is supported and negotiated by every single QUIC server instance in this deployment. Used to generate the AvailableVersions list in the Version Negotiation Extension Transport Parameter. |
77+
| Setting | Type | Registry Name | Default | Description |
78+
|-----------------------------------|------------|------------------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|
79+
| Acceptable Versions List | uint32_t[] | AcceptableVersions | Unset | Sets the list of versions that a given server instance will use if a client sends a first flight using them. |
80+
| Offered Versions List | uint32_t[] | OfferedVersions | Unset | Sets the list of versions that a given server instance will send in a Version Negotiation packet if it receives a first flight from an unknown version. This list will most often be equal to the Acceptable Versions list. |
81+
| Fully-Deployed Versions List | uint32_t[] | FullyDeployedVersions | Unset | Sets the list of QUIC versions that is supported and negotiated by every single QUIC server instance in this deployment. Used to generate the AvailableVersions list in the Version Negotiation Extension Transport Parameter. |
82+
| Version Negotiation Ext. Enabled | uint32_t | VersionNegotiationExtEnabled | 0 (FALSE) | Enables the Version Negotiation Extension. |
8283

8384
The `uint32_t[]` type is a `REG_BINARY` blob of the versions list, with each version in little-endian format.
8485

@@ -114,6 +115,7 @@ These parameters are accessed by calling [GetParam](./api/GetParam.md) or [SetPa
114115
| `QUIC_PARAM_GLOBAL_EXECUTION_CONFIG`<br> 9 | QUIC_EXECUTION_CONFIG | Both | Globally configure the execution model used for QUIC. Must be set before opening registration. |
115116
| `QUIC_PARAM_GLOBAL_TLS_PROVIDER`<br> 10 | QUIC_TLS_PROVIDER | Get-Only | The TLS provider being used by MsQuic for the TLS handshake. |
116117
| `QUIC_PARAM_GLOBAL_STATELESS_RESET_KEY`<br> 11 | uint8_t[] | Set-Only | Globally change the stateless reset key for all subsequent connections. |
118+
| `QUIC_PARAM_GLOBAL_VERSION_NEGOTIATION_ENABLED`<br> (preview) | uint8_t (BOOLEAN) | Both | Globally enable the version negotiation extension for all client and server connections. |
117119

118120
## Registration Parameters
119121

@@ -132,6 +134,7 @@ These parameters are accessed by calling [GetParam](./api/GetParam.md) or [SetPa
132134
| `QUIC_PARAM_CONFIGURATION_TICKET_KEYS`<br> 1 | QUIC_TICKET_KEY_CONFIG[] | Set-only | Resumption ticket encryption keys. Server-side only. |
133135
| `QUIC_PARAM_CONFIGURATION_VERSION_SETTINGS`<br> 2 | QUIC_VERSIONS_SETTINGS | Both | Change version settings for all connections on the configuration. |
134136
| `QUIC_PARAM_CONFIGURATION_SCHANNEL_CREDENTIAL_ATTRIBUTE_W`<br> 3 | QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W | Set-only | Calls `SetCredentialsAttributesW` with the supplied attribute and buffer on the credential handle. Schannel-only. Only valid once the credential has been loaded. |
137+
| `QUIC_PARAM_CONFIGURATION_VERSION_NEG_ENABLED`<br> (preview) | uint8_t (BOOLEAN) | Both | Enables the version negotiation extension for all client connections on the configuration. |
135138

136139
## Listener Parameters
137140

docs/Versions.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Configuring the QUIC versions on a MsQuic server is similar to configuring them
5757

5858
If a server is not in a fleet, or the operator/application does not ever need to change QUIC versions, then all three lists in `QUIC_VERSION_SETTINGS` **MUST** be the same.
5959

60-
If a server is deployed in a fleet, and the server operator wishes to change the supported QUIC versions, the Version Negotiation specification details how that should be done, quoted here:
60+
If a server is deployed in a fleet, and the server operator wishes to change the supported QUIC versions, the [Version Negotiation specification](https://www.rfc-editor.org/rfc/rfc9368.html#section-5) details how that should be done, quoted here:
6161
> When adding support for a new version:
6262
> * The first step is to progressively add support for the new version to all server instances. This step updates the Acceptable Versions but not the Offered Versions nor the Fully-Deployed Versions. Once all server instances have been updated, operators wait for at least one MSL to allow any in-flight Version Negotiation packets to arrive.
6363
> * Then, the second step is to progressively add the new version to Offered Versions on all server instances. Once complete, operators wait for at least another MSL.
@@ -70,7 +70,7 @@ If a server is deployed in a fleet, and the server operator wishes to change the
7070
7171
**Note that this opens connections to version downgrades (but only for partially-deployed versions) during the update window, since those could be due to clients communicating with both updated and non-updated server instances.**
7272

73-
73+
### Configuring Versions via code
7474
This snippet should execute before the server's `QUIC_CONFIGURATION` is created:
7575
```c
7676
QUIC_VERSION_SETTINGS Settings = { 0 };
@@ -92,9 +92,30 @@ MsQuic->SetParam(
9292
&Settings);
9393
```
9494
95+
### Configuring Versions via Windows Registry
96+
MsQuic supports setting the Acceptable Versions, Offered Versions, and Fully-Deployed Versions lists via the Windows registry. These settings are global for all servers and clients on the machine.
97+
The registry settings are overridden by settings specified in the code.
98+
The registry values must be created under the `HKLM\System\CurrentControlSet\Services\MsQuic\Parameters` key.
99+
Each list is stored in the registry as a `REG_BINARY` type, with the version numbers in little-endian (host) order.
100+
The registry value for Acceptable Versions must be named `AcceptableVersions`.
101+
The registry value for Offered Versions must be named `OfferedVersions`.
102+
The registry value for Fully-Deployed Versions must be named `FullyDeployedVersions`.
103+
104+
Here's a sample .reg file that creates all three lists with QUIC version 2 first and QUIC version 1 after, in little endian order, and enables version negotiation:
105+
```reg
106+
Windows Registry Editor Version 5.00
107+
108+
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MsQuic\Parameters]
109+
"AcceptableVersions"=hex:cf,43,33,6b,01,00,00,00
110+
"OfferedVersions"=hex:cf,43,33,6b,01,00,00,00
111+
"FullyDeployedVersions"=hex:cf,43,33,6b,01,00,00,00
112+
"VersionNegotiationExtEnabled"=dword:00000001
113+
```
114+
95115
# QUIC Version Negotiation Extension
96116

97-
The Version Negotiation Extension is on by default in our officially-released binaries. Since the standard is not yet complete, incompatible changes may be made preventing different drafts from working with each other. An application using MsQuic should be cautious about enabling the Version Negotiation Extension in production scenarios until the standard is complete.
117+
The Version Negotiation Extension is off by default in our officially-released binaries, but can be enabled via registry or [Settings](./Settings.md).
118+
The Version Negotiated Extension has been standardized and is present in MsQuic since version 2.3.
98119

99120
## Enabling Version Negotiation Extension on MsQuic Client
100121

@@ -103,4 +124,4 @@ This setting **MUST** be set before [`ConnectionStart`](api/ConnectionStart.md)
103124

104125
## Enabling Version Negotiation Extension on MsQuic Server
105126

106-
Enabling the Version Negotiation Extension on server follows the same restrictions as setting the QUIC version on server, i.e. it **MUST** be set globally, using [`SetParam`](api/SetParam.md) before the `QUIC_CONFIGURATION` is opened for the server. It is set automatically when `QUIC_VERSION_SETTINGS` are set.
127+
Enabling the Version Negotiation Extension on server follows the same restrictions as setting the QUIC version on server, i.e. it **MUST** be set globally, using [`SetParam`](api/SetParam.md) before the `QUIC_CONFIGURATION` is opened for the server. It is set automatically when `QUIC_VERSION_SETTINGS` are set, except via registry.

0 commit comments

Comments
 (0)