deps: h3-0.0.6
This commit is contained in:
parent
8c9b5425cc
commit
9f88bfcafa
7 changed files with 78 additions and 44 deletions
|
|
@ -13,11 +13,10 @@ publish.workspace = true
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
# default = ["http3-s2n", "sticky-cookie", "cache", "rustls-backend"]
|
||||
default = ["http3-quinn", "sticky-cookie", "cache", "rustls-backend"]
|
||||
default = ["http3-s2n", "sticky-cookie", "cache", "rustls-backend"]
|
||||
# default = ["http3-quinn", "sticky-cookie", "cache", "rustls-backend"]
|
||||
http3-quinn = ["socket2", "quinn", "h3", "h3-quinn", "rpxy-certs/http3"]
|
||||
http3-s2n = [
|
||||
"h3",
|
||||
"s2n-quic",
|
||||
"s2n-quic-core",
|
||||
"s2n-quic-rustls",
|
||||
|
|
@ -54,8 +53,8 @@ thiserror = "1.0.61"
|
|||
# http for both server and client
|
||||
http = "1.1.0"
|
||||
http-body-util = "0.1.2"
|
||||
hyper = { version = "1.3.1", default-features = false }
|
||||
hyper-util = { version = "0.1.5", features = ["full"] }
|
||||
hyper = { version = "1.4.0", default-features = false }
|
||||
hyper-util = { version = "0.1.6", features = ["full"] }
|
||||
futures-util = { version = "0.3.30", default-features = false }
|
||||
futures-channel = { version = "0.3.30", default-features = false }
|
||||
|
||||
|
|
@ -84,9 +83,11 @@ tracing = { version = "0.1.40" }
|
|||
|
||||
# http/3
|
||||
quinn = { version = "0.11.2", optional = true }
|
||||
h3 = { version = "0.0.5", optional = true }
|
||||
h3-quinn = { version = "0.0.6", optional = true }
|
||||
s2n-quic-h3 = { path = "../submodules/s2n-quic-h3/", optional = true }
|
||||
h3 = { version = "0.0.6", features = ["tracing"], optional = true }
|
||||
h3-quinn = { version = "0.0.7", optional = true }
|
||||
s2n-quic-h3 = { path = "../submodules/s2n-quic-h3/", features = [
|
||||
"tracing",
|
||||
], optional = true }
|
||||
s2n-quic = { version = "1.41.0", default-features = false, features = [
|
||||
"provider-tls-rustls",
|
||||
], optional = true }
|
||||
|
|
|
|||
|
|
@ -36,9 +36,12 @@ pub enum RpxyError {
|
|||
HyperBodyError(#[from] hyper::Error),
|
||||
|
||||
// http/3 errors
|
||||
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||
#[cfg(feature = "http3-quinn")]
|
||||
#[error("H3 error: {0}")]
|
||||
H3Error(#[from] h3::Error),
|
||||
#[cfg(feature = "http3-s2n")]
|
||||
#[error("H3 error: {0}")]
|
||||
H3Error(#[from] s2n_quic_h3::h3::Error),
|
||||
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||
#[error("Exceeds max request body size for HTTP/3")]
|
||||
H3TooLargeBody,
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ use hyper_util::client::legacy::connect::Connect;
|
|||
use std::net::SocketAddr;
|
||||
|
||||
#[cfg(feature = "http3-quinn")]
|
||||
use h3::{quic::BidiStream, quic::Connection as ConnectionQuic, server::RequestStream};
|
||||
use h3::{quic::BidiStream, quic::Connection as ConnectionQuic, quic::OpenStreams, server::RequestStream};
|
||||
#[cfg(all(feature = "http3-s2n", not(feature = "http3-quinn")))]
|
||||
use s2n_quic_h3::h3::{self, quic::BidiStream, quic::Connection as ConnectionQuic, server::RequestStream};
|
||||
use s2n_quic_h3::h3::{self, quic::BidiStream, quic::Connection as ConnectionQuic, quic::OpenStreams, server::RequestStream};
|
||||
|
||||
impl<T> Proxy<T>
|
||||
where
|
||||
|
|
@ -28,9 +28,9 @@ where
|
|||
) -> RpxyResult<()>
|
||||
where
|
||||
C: ConnectionQuic<Bytes>,
|
||||
<C as ConnectionQuic<Bytes>>::BidiStream: BidiStream<Bytes> + Send + 'static,
|
||||
<<C as ConnectionQuic<Bytes>>::BidiStream as BidiStream<Bytes>>::RecvStream: Send,
|
||||
<<C as ConnectionQuic<Bytes>>::BidiStream as BidiStream<Bytes>>::SendStream: Send,
|
||||
<C as OpenStreams<Bytes>>::BidiStream: BidiStream<Bytes> + Send + 'static,
|
||||
<<C as OpenStreams<Bytes>>::BidiStream as BidiStream<Bytes>>::RecvStream: Send,
|
||||
<<C as OpenStreams<Bytes>>::BidiStream as BidiStream<Bytes>>::SendStream: Send,
|
||||
{
|
||||
let mut h3_conn = h3::server::Connection::<_, Bytes>::new(quic_connection).await?;
|
||||
info!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue