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

Proposal: export more HTTP/3 related interfaces for caddy plugins to use #6017

Open
WeidiDeng opened this issue Jan 4, 2024 · 1 comment
Labels
discussion 💬 The right solution needs to be found feature ⚙️ New feature or request

Comments

@WeidiDeng
Copy link
Member

There are several popular projects that utilize many of quic-go's implementation of http3 features that currently can't be used by caddy modules, limiting how caddy can be extended.

For example, ssh3 uses StreamHijacker to handle tcp and udp forwarding using an on-going quic.Connection. It uses http3.Hijacker to establish ssh3 sessions. We should also export a caddyhttp.Unwrap function to extract the underlying http.ResponseWriter in this case.

hysteria, a proxy protocol, uses StreamHijacker as well to handle tcp traffic forwarding. It uses a fork of quic-go which implemented bbr congestion control, but most of the interfaces are the same as the original quic-go.

webtransport-go uses http3.HTTPStreamer to take over the http stream. Currently if we enable logging, request body will be wrapped and we (lose the access)[https://github.com/caddyserver/caddy/blob/master/modules/caddyhttp/server.go#L322] to the underlying io.ReadCloser.

@mholt
Copy link
Member

mholt commented Mar 7, 2024

I'm open to this. As long as it would work generally (for example, if wrapped more than once, will Unwrap still work?).

@mholt mholt added feature ⚙️ New feature or request discussion 💬 The right solution needs to be found labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion 💬 The right solution needs to be found feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants