-
-
Couldn't load subscription status.
- Fork 604
Add HTTP/3 support
#1531
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
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) ( |
|
Apologies, just getting around to testing this myself now.
|
|
This PR adds the necessary configuration for proper HTTP/3 support (by
nginx) (with HTTP/1/HTTPS/2 co-existence).nginxdocumentation, forum threads (1; 2) are added to the configuration when HTTP/3 support is turned on.fermfirewall 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).
nginxrequires one (and only one listen quic directive to have thereuseportoption (only one listen quic directive can have thereuseportoption). As the listen quic directive requires a certificate, the first WordPress site ("vhost") that has HTTPS enabled, has thereuseportoption 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.
443is actually not mandatory for HTTP/3 (to some degree, also depending on browser), but it is recommended to use the same port number443as for HTTPS (TCP),nginxthen listens on443/UDPin parallel to443/TCPfor HTTP/1/HTTPS/2.Protocolcolumn on).curl/wgetHTTP/3 support is not a given in current stable Ubuntu. I used acurl Docker image with HTTP/3 support.Useful resources
nginxHTTP/3 example configurationcurlwith HTTP/3 supportnginxadd_headerinheritance/pitfallsnginxHTTP/3 configurationnginxngx_http_v3HTTP/3 module documentationnginxwith HTTP1.1/2/3 with some encountered issuesGSO