comparison README @ 9047:c851a2ed5ce8 quic

HTTP/3: "quic" parameter of "listen" directive. Now "listen" directve has a new "quic" parameter which enables QUIC protocol for the address. Further, to enable HTTP/3, a new directive "http3" is introduced. The hq-interop protocol is enabled by "http3_hq" as before. Now application protocol is chosen by ALPN. Previously used "http3" parameter of "listen" is deprecated.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 27 Feb 2023 14:00:56 +0400
parents 7da4791e0264
children 8347620e0e76
comparison
equal deleted inserted replaced
9046:7da4791e0264 9047:c851a2ed5ce8
100 --with-cc-opt="-I../libressl/build/include" \ 100 --with-cc-opt="-I../libressl/build/include" \
101 --with-ld-opt="-L../libressl/build/lib" 101 --with-ld-opt="-L../libressl/build/lib"
102 102
103 3. Configuration 103 3. Configuration
104 104
105 The HTTP "listen" directive got a new option "http3" which enables 105 The HTTP "listen" directive got a new option "quic" which enables
106 HTTP/3 over QUIC on the specified port. 106 QUIC as client transport protocol instead of TCP.
107 107
108 The Stream "listen" directive got a new option "quic" which enables 108 The Stream "listen" directive got a new option "quic" which enables
109 QUIC as client transport protocol instead of TCP or plain UDP. 109 QUIC as client transport protocol instead of TCP or plain UDP.
110 110
111 Along with "http3" or "quic", it's also possible to specify "reuseport" 111 Along with "quic", it's also possible to specify "reuseport"
112 option [8] to make it work properly with multiple workers. 112 option [8] to make it work properly with multiple workers.
113 113
114 To enable address validation: 114 To enable address validation:
115 115
116 quic_retry on; 116 quic_retry on;
140 Enable it in case a corresponding network interface is configured to 140 Enable it in case a corresponding network interface is configured to
141 support GSO. 141 support GSO.
142 142
143 A number of directives were added that configure HTTP/3: 143 A number of directives were added that configure HTTP/3:
144 144
145 http3
146 http3_hq
145 http3_stream_buffer_size 147 http3_stream_buffer_size
146 http3_max_concurrent_pushes 148 http3_max_concurrent_pushes
147 http3_max_concurrent_streams 149 http3_max_concurrent_streams
148 http3_push 150 http3_push
149 http3_push_preload 151 http3_push_preload
150 http3_hq (requires NGX_HTTP_V3_HQ macro)
151 152
152 In http, an additional variable is available: $http3. 153 In http, an additional variable is available: $http3.
153 The value of $http3 is "h3" for HTTP/3 connections, 154 The value of $http3 is "h3" for HTTP/3 connections,
154 "hq" for hq connections, or an empty string otherwise. 155 "hq" for hq connections, or an empty string otherwise.
155 156
167 access_log logs/access.log quic; 168 access_log logs/access.log quic;
168 169
169 server { 170 server {
170 # for better compatibility it's recommended 171 # for better compatibility it's recommended
171 # to use the same port for quic and https 172 # to use the same port for quic and https
172 listen 8443 http3 reuseport; 173 listen 8443 quic reuseport;
173 listen 8443 ssl; 174 listen 8443 ssl;
174 175
175 ssl_certificate certs/example.com.crt; 176 ssl_certificate certs/example.com.crt;
176 ssl_certificate_key certs/example.com.key; 177 ssl_certificate_key certs/example.com.key;
177 ssl_protocols TLSv1.3; 178 ssl_protocols TLSv1.3;
295 Default: http3_push_preload off; 296 Default: http3_push_preload off;
296 Context: http, server, location 297 Context: http, server, location
297 298
298 Enables automatic conversion of preload links specified in the “Link” 299 Enables automatic conversion of preload links specified in the “Link”
299 response header fields into push requests. 300 response header fields into push requests.
301
302
303 Syntax: http3 on | off;
304 Default: http3 on;
305 Context: http, server
306
307 Enables HTTP/3 protocol negotiation.
300 308
301 309
302 Syntax: http3_hq on | off; 310 Syntax: http3_hq on | off;
303 Default: http3_hq off; 311 Default: http3_hq off;
304 Context: http, server 312 Context: http, server