Http/3 alt-srv incorrect port

Caddy version
v2.0.0-beta10 h1:MkLEoR4kj30H90sZ4YBg9O7sd4Zrl77H0m3mW9gyEmE=

[caddy2_beta10_linux_amd64] downloaded today from Release 2.0 beta 10 · caddyserver/caddy · GitHub

When running the binary against a minimal config file

./20191219-caddyv2 run -config ./caddy.conf  --adapter caddyfile

where caddy.conf is

  root * /var/html/
  try_files {path}.html {path}
  encode gzip zstd brotli

The server starts, with the following

2019/12/19 17:42:16.806	INFO	admin	admin endpoint started	{"address": "localhost:2019", "enforce_origin": false, "origins": ["localhost:2019"]}
2019/12/19 17:42:16.807	INFO	http	enabling automatic TLS certificate management	{"domains": [""]}
2019/12/19 17:42:16.807	INFO	http	enabling automatic HTTP->HTTPS redirects	{"domains": [""]}
2019/12/19 17:42:16.807	INFO	http	enabling experimental HTTP/3 listener	{"addr": ":443"}
**2019/12/19 17:42:16.808	INFO	http	enabling experimental HTTP/3 listener	{"addr": ":444"}**
2019/12/19 17:42:16.808	INFO	tls	cleaned up storage units
2019/12/19 17:42:16.808	INFO	admin	Caddy 2 serving initial configuration
2019/12/19 17:42:16 [INFO][cache:0xc00009f9f0] Started certificate maintenance routine

as you see the experimental http/3 listens on a port one above 443 (as well as 443.)

When accessing

curl -I

The alt-srv header is

h3-23=":444"; ma=2592000

so the alternative service isn’t on the same port.

I can work around this by starting the server on port 442, at which point

curl -I

gives a alt-srv header as:

h3-23=":443"; ma=2592000

and everything works as expected, tested.

1 Like

Can you build from source, the latest on the v2 branch? This might have already been fixed.

I would but from memory I had a lot of trouble with missing modules… crypto/ed25519 etc… and got stuck somewhere along the line. (amazon linux2)

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