revert to quinn-0.8.5

This commit is contained in:
Jun Kurihara 2023-01-25 02:09:13 +09:00
commit d9f5b60551
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
2 changed files with 8 additions and 8 deletions

View file

@ -49,9 +49,9 @@ hyper-rustls = { version = "0.23.2", default-features = false, features = [
"http2",
] }
bytes = "1.3.0"
quinn = { version = "0.9.3", optional = true }
quinn = { version = "0.8.5", optional = true }
h3 = { path = "./h3/h3/", optional = true }
h3-quinn = { path = "./h3-quinn/", optional = true }
h3-quinn = { path = "./h3/h3-quinn/", optional = true }
thiserror = "1.0.38"
x509-parser = "0.14.0"
derive_builder = "0.12.0"

View file

@ -6,7 +6,11 @@ use crate::{
log::*,
utils::BytesName,
};
#[cfg(feature = "http3")]
use futures::StreamExt;
use hyper::{client::connect::Connect, server::conn::Http};
#[cfg(feature = "http3")]
use quinn::{crypto::rustls::HandshakeData, Endpoint, ServerConfig as QuicServerConfig, TransportConfig};
use rustls::ServerConfig;
use std::sync::Arc;
use tokio::{
@ -15,9 +19,6 @@ use tokio::{
time::{sleep, timeout, Duration},
};
#[cfg(feature = "http3")]
use quinn::{crypto::rustls::HandshakeData, Endpoint, ServerConfig as QuicServerConfig, TransportConfig};
impl<T> Proxy<T>
where
T: Connect + Clone + Sync + Send + 'static,
@ -134,13 +135,12 @@ where
let mut server_config_h3 = QuicServerConfig::with_crypto(Arc::new(rustls_server_config));
server_config_h3.transport = Arc::new(transport_config_quic);
server_config_h3.concurrent_connections(self.globals.h3_max_concurrent_connections);
// let (endpoint, mut incoming) = Endpoint::server(server_config_h3, self.listening_on)?;
let endpoint = Endpoint::server(server_config_h3, self.listening_on)?;
let (endpoint, mut incoming) = Endpoint::server(server_config_h3, self.listening_on)?;
let mut server_crypto: Option<Arc<ServerCrypto>> = None;
loop {
tokio::select! {
new_conn = endpoint.accept() => {
new_conn = incoming.next() => {
if server_crypto.is_none() || new_conn.is_none() {
continue;
}