1

I've been trying to set up a webserver on localhost which supports HTTP/3. I've successfully run an caddy server run in docker which answers to GET requests with this header:

alt-svc: h3-27=":443"; ma=2592000
content-encoding: gzip
content-length: 1521
content-type: text/html; charset=utf-8
date: Thu, 07 May 2020 07:27:44 GMT
server: Caddy
status: 200
vary: Accept-Encoding
X-DNS-Prefetch-Control: off

Even though the alt-scv header was received I couldn't detect any h3-27 requests in the network logs of the developer tools.

Also created a CA, which I added to chrome, and signed the certificate of the server which Chrome accepts. I ran Chrome with the flags --enable-quic --quic-version="h3-27", as suggested in this article. I've tried the same with an nginx server based on this image and couldn't make it work as well.

What am I missing?

Caddyfile:

{
    experimental_http3
}

localhost {
    root * /usr/share/caddy/
    encode zstd gzip
    templates
    file_server
    tls /etc/caddy/certs/localhost.crt /etc/caddy/certs/localhost.key
}

Caddy Output:

2020/05/07 07:23:50.939 INFO    using provided configuration    {"config_file": "/etc/caddy/Caddyfile", "config_adapter": "caddyfile"}
2020/05/07 07:23:51.252 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["127.0.0.1:2019", "localhost:2019", "[::1]:2019"]}
2020/05/07 07:23:51 [INFO][cache:0xc00088da90] Started certificate maintenance routine
2020/05/07 07:23:51 [WARNING] Stapling OCSP: no OCSP stapling for [localhost bar.localhost]: no OCSP server specified in certificate
2020/05/07 07:23:51.254 INFO    http    skipping automatic certificate management because one or more matching certificates are already loaded  {"domain": "localhost", "server_name": "srv0"}
2020/05/07 07:23:51.254 INFO    http    enabling automatic HTTP->HTTPS redirects    {"server_name": "srv0"}
2020/05/07 07:23:51.255 INFO    tls cleaned up storage units
2020/05/07 07:23:51.256 INFO    http    enabling experimental HTTP/3 listener   {"addr": ":443"}
2020/05/07 07:23:51.257 INFO    autosaved config    {"file": "/config/caddy/autosave.json"}
2020/05/07 07:23:51.257 INFO    serving initial configuration
Daniel Stenberg
  • 54,736
  • 17
  • 146
  • 222

1 Answers1

0

Found the reason myself. The current version of Chrome (Version 81.0.4044.138) does not support this version of Quic (h3-27). It could be fixed by using using chrome-dev (Version 84.0.4136.5).

  • You can enable it in flags `chrome://flags/#enable-quic` in a regular prod build. – DCTID Aug 10 '20 at 02:23
  • 1
    I'm using chrome 87.0.4280.66 on Ubuntu 20.04 LTS, and the connection **won't** switch to h3 even if the `chrome://flags/#enable-quic` is set or using the command line flags `--enable-quic --quic-version=h3-29` (with a server using the `alt-svc` header). It **does** work with the FireFox nightly build. – Rob Blackbourn Dec 05 '20 at 11:00