Skip to content
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 support for HTTP/3 #331

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ conf.d/*.conf
!conf.d/.default.conf
!conf.d/no-ssl.default.conf
test/*
!test/vhosts/
!test/vhosts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ nginx -s reload

## Support

* Nginx v**1.8.0**+
* Nginx v**1.25.0**+


## Contributing
Expand Down
9 changes: 7 additions & 2 deletions conf.d/.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
# returning 444 "No Response".

server {
listen [::]:443 ssl http2 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
listen [::]:443 ssl default_server;
listen 443 ssl default_server;

http2 on;
http3 on;

server_name _;

Expand Down
16 changes: 10 additions & 6 deletions conf.d/templates/example.com.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
# the right one.
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#server-name-if
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
listen [::]:443 ssl;
listen 443 ssl;

server_name www.example.com;

Expand All @@ -24,10 +26,12 @@ server {


server {
# listen [::]:443 ssl http2 accept_filter=dataready; # for FreeBSD
# listen 443 ssl http2 accept_filter=dataready; # for FreeBSD
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
# listen [::]:443 ssl accept_filter=dataready; # for FreeBSD
# listen 443 ssl accept_filter=dataready; # for FreeBSD
listen [::]:443 ssl;
listen 443 ssl;

# The host name to respond to
server_name example.com;
Expand Down
7 changes: 7 additions & 0 deletions h5bp/protocol/http2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ----------------------------------------------------------------------
# | HTTP/2 Support |
# ----------------------------------------------------------------------

# https://nginx.org/en/docs/http/ngx_http_v2_module.html

http2 on;
7 changes: 7 additions & 0 deletions h5bp/protocol/http3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ----------------------------------------------------------------------
# | HTTP/3 Support |
# ----------------------------------------------------------------------

# https://nginx.org/en/docs/http/ngx_http_v3_module.html

http3 on;
6 changes: 4 additions & 2 deletions test/vhosts/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ server {


server {
listen [::]:443 ssl http2 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
listen [::]:443 ssl default_server;
listen 443 ssl default_server;

server_name _;

Expand Down
12 changes: 8 additions & 4 deletions test/vhosts/secure.server.localhost.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
listen [::]:443 ssl;
listen 443 ssl;

server_name www.secure.server.localhost;

Expand All @@ -12,8 +14,10 @@ server {
}

server {
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 quic reuseport;
listen 443 quic reuseport;
listen [::]:443 ssl;
listen 443 ssl;

server_name secure.server.localhost;

Expand Down
Loading