Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable h3 for unix domain socket #6769

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Geun-Oh
Copy link

@Geun-Oh Geun-Oh commented Jan 5, 2025

Related Issue: #6760

Disable HTTP/3 for unix domain socket

Caddyfile

example.com {
  bind unix/@test
  respond 200
}

Preview

2025/01/05 05:28:28.361	INFO	using adjacent Caddyfile
2025/01/05 05:28:28.361	INFO	adapted config to JSON	{"adapter": "caddyfile"}
2025/01/05 05:28:28.361	WARN	Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies	{"adapter": "caddyfile", "file": "Caddyfile", "line": 2}
2025/01/05 05:28:28.363	INFO	admin	admin endpoint started	{"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2025/01/05 05:28:28.363	INFO	http.auto_https	enabling automatic HTTP->HTTPS redirects	{"server_name": "srv0"}
2025/01/05 05:28:28.363	WARN	http	HTTP/3 disabled because Unix can't multiplex STREAM and DGRAM on same socket	{"file": "@test"}
2025/01/05 05:28:28.363	INFO	tls.cache.maintenance	started background certificate maintenance	{"cache": "0x14000625400"}
2025/01/05 05:28:28.364	INFO	http.log	server running	{"name": "srv0", "protocols": ["h1", "h2"]}
2025/01/05 05:28:28.364	INFO	http	enabling automatic TLS certificate management	{"domains": ["example.com"]}
2025/01/05 05:28:28.365	INFO	autosaved config (load with --resume flag)	{"file": "/Users/user/.config/caddy/autosave.json"}
2025/01/05 05:28:28.365	INFO	serving initial configuration
2025/01/05 05:28:28.370	INFO	tls	storage cleaning happened too recently; skipping for now	{"storage": "FileStorage:/Users/user/.local/share/caddy", "instance": "534925d6-3750-47c4-9f3b-703fce2d2263", "try_again": "2025/01/06 05:28:28.370", "try_again_in": 86399.99999975}
2025/01/05 05:28:28.371	INFO	tls	finished cleaning storage units
2025/01/05 05:28:28.373	INFO	tls.obtain	acquiring lock	{"identifier": "example.com"}

It's the same behavior with version 2.8.4

Please tell me if there is another points that I have to care about.


BTW, do you mind if caddy to provide HTTP/3 uds connection (with only SOCK_DGRAM)?
Maybe it'll be good if caddy provides optional uds connection with configuration in Caddyfile.
Like below...

example.com {
  bind_http3 unix/@test
  respond 200
}

If you have mind with it, I'll make a new issue.

Thanks.

@CLAassistant
Copy link

CLAassistant commented Jan 5, 2025

CLA assistant check
All committers have signed the CLA.

modules/caddyhttp/app.go Outdated Show resolved Hide resolved
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. LGTM at a glance. Do you have any other critiques, @WeidiDeng ?

@mholt mholt added this to the v2.9.1 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Caddy 2.9.0 will not disable h3 for unix domain socket
5 participants