[PATCH 0 of 3] Directives for enabling http2 and http3

Roman Arutyunyan arut at nginx.com
Thu Jan 26 11:50:44 UTC 2023


Hi,

These patches change http2 and http3 configurations.  Previously, both protocols
were configured by "listen" parameters:

  listen 8800 ssl http2;
  listen 8443 http3;

The patches introduce new directives for configuring http2 and http3 in server
scope:

  server {
      listen 8800 ssl;
      listen 8443 quic;

      http2 on;
      http3 on;

      ...
  }

Now protocol list is a property of server, not a listener.  After choosing
a server by SNI, nginx has a list of protocols supported in that particular
server.  The right protocol is then chosen in ALPN callback.

For plain http2 connections, a simple preread is implemented which tells http/1
from http2 by the first symbol similar to TLS signature preread in http.

--
Roman Arutyunyan


More information about the nginx-devel mailing list