-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Access Client Hello before accepting connection #2024
Comments
|
I see. Sounds like a non-trivial amount if work. That's unfortunate. Maybe it would be easier to add an accept method, which takes a closure mapping Client Hello to a rustls config as a first step. |
We already have a |
But the fact that the handshake data is available in |
|
I'm not sure if this would be feasible. The motivation here is to make the connection's configuration depending on the Client Hello, so we have to defer the connection logic until after the application has had its opportunity to weigh in, similar to how A callback could work, though it's a bit of a compromise ergonomically. |
Adding an async |
That could work. I think it'd need about the same changes at the proto layer: we still want decode a Client Hello but defer all other work, and unless the user calls |
Stupid question: Reaching |
Yes, the first CRYPTO frame is included, but there's no guarantee the complete ClientHello has been received (particularly with post-quantum key exchange). |
Does quinn accept API breaking change? We are deeply rely on lazy select server_config. Could we accept callback style like s2n or LazyAcceptor like rustls? |
We could accept a breaking change, but I'm not sure we'd want this to be breaking? Depends on how it breaks current users.
Who's we, what are you using Quinn for?
I think we'd probably prefer something closer to rustls, mainly so callers can asynchronously decide which |
Our company have rust based gateway, try to add quic/http3 on it. So I am researching a Rust QUIC library(quinn/msquic/s2n/quiche/quictls) to integrate it into the gateway. |
You may know this issue. I solved by patch rustls. rustls/rustls#1976. since it cause breaking api change. I haven't submit PR. I prefer use quic library which can integrate rustls as tls backend, so we can reuse previous patched rustls. |
Quinn integrates rustls already, and also makes the encryption layer pluggable so you could use your own rustls fork instead. |
Yes, but quinn don't support select ServerConfig. In Tcp tls, we have TlsClientParse, We pre-parse tcp data get SNI before rustls get involved, so we can select different ServerConfig. But quic encapsulate TLS into itself, we can't pre-parse simple You can think we are NGINX, we have many domain listen on same quic port, we need use different cert/pkey. NGINX use openssl SSL_CTX_set_tlsext_servername_callback callback, so we need find rustls style way to solve it. :) |
I think that's definitely feasible, someone just needs to do the work (or someone can pay me to do the work, happy to discuss). |
On the first gray version, we will have 1,000,000 qps http/3 traffic which power our core business. So quic library wish stable and reliable. |
I need to access the
rustls::server::ClientHello
or at least the content ofserver_name()
before choosing a rustls config.alpn()
would also be very useful. Could this be exposed viaIncoming
or is that too early?The text was updated successfully, but these errors were encountered: