-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Add HTTP/3
support
#1531
base: master
Are you sure you want to change the base?
Add HTTP/3
support
#1531
Conversation
@swalkinshaw: Using |
The SSL early data option allows for RTT-0 requests (zero round-trip time), however, it comes with security implications (possibility of replay attacks), the application layer (so the PHP WordPress app here) gets a HTTP Header |
Mind rebasing @strarsis ? Looks good otherwise and all the notes/documentation is appreciated. |
@swalkinshaw: Sure! I also have to test the HTTP/3 specific configuration a bit further. |
415a4de
to
fc4239e
Compare
@swalkinshaw: Well, I "rebased" it somehow. If necessary, I create a new branch/PR. So it turned out that a global listen for QUIC with |
😓 wow they really don't make this easy. I'll try and think of another solution for the default site/SSL cert 🤔 |
That listen quic is only needed for reuseport (apparently required by the nginx worker processes for correctly responding to QUIC requests). With listen quic nginx requires a SSL cert and key, but that listen and SSL would not be used otherwise. Working, confirmed alternatives:
|
Edit: jinja namespaces probably do not scope beyond the iteration of ansible template loops, so a different approach is used. Now simply the first site that uses HTTPS will have the |
Improve newlines in config.
@swalkinshaw: Edit: After some real-world testing I noticed that some WordPress sites had redirect issues (on frontend) ( |
This PR adds the necessary configuration for proper HTTP/3 support (by
nginx
) (with HTTP/1/HTTPS/2 co-existence).nginx
documentation, forum threads (1; 2) are added to the configuration when HTTP/3 support is turned on.ferm
firewall is also configured to allow inbound UDP/433 for QUIC (HTTP/3).The approach is also used in the previous PR for HTTPS (Conditionally add HTTPS inbound allow firewall rule #1530).
nginx
requires one (and only one listen quic directive to have thereuseport
option (only one listen quic directive can have thereuseport
option). As the listen quic directive requires a certificate, the first WordPress site ("vhost") that has HTTPS enabled, has thereuseport
option added to its listen quic directive.Additional notes (some may be useful in the documentation):
of course it also needs to be configured for allowing inbound UDP/443 traffic for QUIC (HTTP/3) (example for Hetzner Cloud Firewall).
without this HTTP header, HTTP/3 will not work, despite everything else being perfectly configured and running.
443
is actually not mandatory for HTTP/3 (to some degree, also depending on browser), but it is recommended to use the same port number443
as for HTTPS (TCP),nginx
then listens on443
/UDP
in parallel to443
/TCP
for HTTP/1/HTTPS/2.Protocol
column on).curl
/wget
HTTP/3 support is not a given in current stable Ubuntu. I used acurl Docker image with HTTP/3 support
.Useful resources
nginx
HTTP/3 example configurationcurl
with HTTP/3 supportnginx
add_header
inheritance/pitfallsnginx
HTTP/3 configurationnginx
ngx_http_v3
HTTP/3 module documentationnginx
with HTTP1.1/2/3 with some encountered issuesGSO