V2: How to test HTTP/3 support?

1. My Caddy version (caddy -version):

v2.0.0-beta9 h1:oILdAOfunJ4ijBN9kOWjFIeH8EufBX/N1pC9HbnwjzU=

2. How I run Caddy:

a. System environment:

Ubuntu 19.10 eoan (GNU/Linux 5.3.0-22-generic x86_64)
on a Linode

b. Command:

/usr/local/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile

c. Service/unit/compose file:

For this test, I’m just running Caddy as my personal user from the command line.

d. My complete Caddyfile:

{
	experimental_http3
}

sunrisemovement.dev, www.sunrisemovement.dev
root * /srv/sunrisemovement.dev/public/
try_files {path}.html {path}
encode gzip zstd brotli
file_server

3. The problem I’m having:

Caddy appears to be successfully launching with HTTP/3 support enabled, and I’m allowing UDP traffic through my firewall on port 443. However, visiting my test site with Chrome Canary or Firefox Nightly with HTTP/3 support enabled does not seem to result in an HTTP/3 connection.

HTTP/3 Check https://http3check.net/?host=https%3A%2F%2Fwww.sunrisemovement.dev%2F also fails to acquire an HTTP/3 connection, saying " HTTP/3 Check could not get the server’s advertised QUIC versions due to the error given below. Server does not advertise supported HTTP/3 or QUIC version on the same port." Which is weird, because I think I actually see what they’re looking for in their own output:

HTTP Header

HTTP/1.1 200 OK
Alt-Svc: quic=":443"; ma=2592000; v="4278190102"
Content-Length: 176
Content-Type: text/html; charset=utf-8
Etag: "q0u0rs4w"
Last-Modified: Tue, 12 Nov 2019 01:14:16 GMT
Server: Caddy
Date: Wed, 13 Nov 2019 17:20:19 GMT

I just want to make sure that I’ve gotten HTTP/3 working as well as it can in this version of Caddy. What should I do?

4. Error messages and/or full log output:

nelson@attenborough:~$ /usr/local/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
2019/11/13 17:18:37.768 INFO    admin   admin endpoint started  {"address": "localhost:2019", "enforce_origin": false, "origins": ["localhost:2019"]}
2019/11/13 17:18:37.769 INFO    http    enabling automatic TLS certificate management   {"domains": ["www.sunrisemovement.dev", "sunrisemovement.dev"]}
2019/11/13 17:18:37.771 INFO    http    enabling automatic HTTP->HTTPS redirects        {"domains": ["www.sunrisemovement.dev", "sunrisemovement.dev"]}
2019/11/13 17:18:37.772 INFO    http    enabling experimental HTTP/3 listener   {"addr": ":443"}
2019/11/13 12:18:37 [INFO][cache:0xc0001be780] Started certificate maintenance routine
2019/11/13 17:18:37.795 INFO    tls     cleaned up storage units
2019/11/13 17:18:37.795 INFO    admin   Caddy 2 serving initial configuration
2019/11/13 17:20:19.617 INFO    http.log.access received request        {"request": {"method": "GET", "uri": "/", "proto": "HTTP/1.1", "remote_addr": "[2604:a880:800:a1::1279:3001]:34198", "host": "www.sunrisemovement.dev", "headers": {"Connection": ["keep-alive"], "User-Agent": ["wget/http3check.net"], "Accept": ["*/*"], "Accept-Encoding": ["gzip, deflate"]}, "tls": {"resumed": false, "version": 772, "resumed": 4865, "proto": "", "proto_mutual": true, "server_name": "www.sunrisemovement.dev"}}, "common_log": "2604:a880:800:a1::1279:3001 - - [13/Nov/2019:12:20:19 -0500] \"GET / HTTP/1.1\" 200 176", "latency": 0.007327598, "size": 176, "status": 200}

As far as I know, Caddy is successfully listening for UDP on port 443:

nelson@attenborough:~$ sudo netstat -peanut | grep caddy
tcp        0      0 127.0.0.1:2019          0.0.0.0:*               LISTEN      1004       23603      955/caddy
tcp6       0      0 :::80                   :::*                    LISTEN      1004       23610      955/caddy
tcp6       0      0 :::443                  :::*                    LISTEN      1004       23608      955/caddy
udp6       0      0 :::443                  :::*                                1004       23609      955/caddy

5. What I already tried:

6. Links to relevant resources:

Hi,
you could check using a web browser with HTTP/3 support. Currently that’s Chrome Canary and Firefox Nightly.

In Chrome Canary’s Web Developer Tools, HTTP/3 is currently still called “http/2+quic/99” - guess that’s going to change soon.

image

You should also be able to find the following header:

alt-svc: h3-23=":443"; ma=86400

In Firefox Nightly, it looks like this:

image

I noticed that for my sites, some requests will use HTTP/3 while others still use HTTP/2 - not sure why that is.

Best,
Jan

Thank you for the details, but I did say I already checked HTTP/3 in Canary and Firefox Nightly :slight_smile: I’ve confirmed that I am able to get HTTP/3 working in those browsers on some sites, most notably Cloudflare addresses, but so far never on my Caddy v2 sites.