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 HTTP/3 Check - www.sunrisemovement.dev 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:

1 Like

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.

Now testing in Caddy v2.0.0-beta11, I’m able to get Geekflare HTTP/3 Testing Tool to tell me that HTTP3 works on www.sunrisemovement.dev, it says “Great! HTTP/3 is enabled. It supports the following protocol version. H3-24”.

Firefox Nightly also showed me HTTP3 briefly, before returning to HTTP2 after a hard reload. I don’t know what happened.

Sadly, now https://http3check.net/ won’t load the page at all. “HTTP/3 Check Internal Errors Request timed out.”

So I’m not really confident that http3 is working, despite what GeekFlare says.

The source for the HTTP3 Check isn’t available, so we aren’t sure what it’s doing, and we’re not really confident that it’s testing the right thing for quic-go’s current HTTP/3 draft implementation. This is part of the uncertainty that comes with testing experimental protocols. Caddy’s H3 works fine with draft 24.

1 Like

OK, I believe you (and have no particular reason to trust LiteSpeed’s test site), but what I’m asking is, how are you testing HTTP/3 internally? How did you determine that Caddy’s H3 works fine with draft 24? I just want to run the same test(s) you’re running.

1 Like

With Caddy v2 beta 17, both public h3 tests at http3check.net and gf.dev return reasonable output (h3-27 + 0-RTT :heart_eyes:)

4 Likes

Yay! That’s great!! Thanks for the info!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.