revert to quinn-0.8.5
This commit is contained in:
parent
6f7cb41b61
commit
d9f5b60551
2 changed files with 8 additions and 8 deletions
|
|
@ -49,9 +49,9 @@ hyper-rustls = { version = "0.23.2", default-features = false, features = [
|
||||||
"http2",
|
"http2",
|
||||||
] }
|
] }
|
||||||
bytes = "1.3.0"
|
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 = { path = "./h3/h3/", optional = true }
|
||||||
h3-quinn = { path = "./h3-quinn/", optional = true }
|
h3-quinn = { path = "./h3/h3-quinn/", optional = true }
|
||||||
thiserror = "1.0.38"
|
thiserror = "1.0.38"
|
||||||
x509-parser = "0.14.0"
|
x509-parser = "0.14.0"
|
||||||
derive_builder = "0.12.0"
|
derive_builder = "0.12.0"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@ use crate::{
|
||||||
log::*,
|
log::*,
|
||||||
utils::BytesName,
|
utils::BytesName,
|
||||||
};
|
};
|
||||||
|
#[cfg(feature = "http3")]
|
||||||
|
use futures::StreamExt;
|
||||||
use hyper::{client::connect::Connect, server::conn::Http};
|
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 rustls::ServerConfig;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::{
|
use tokio::{
|
||||||
|
|
@ -15,9 +19,6 @@ use tokio::{
|
||||||
time::{sleep, timeout, Duration},
|
time::{sleep, timeout, Duration},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "http3")]
|
|
||||||
use quinn::{crypto::rustls::HandshakeData, Endpoint, ServerConfig as QuicServerConfig, TransportConfig};
|
|
||||||
|
|
||||||
impl<T> Proxy<T>
|
impl<T> Proxy<T>
|
||||||
where
|
where
|
||||||
T: Connect + Clone + Sync + Send + 'static,
|
T: Connect + Clone + Sync + Send + 'static,
|
||||||
|
|
@ -134,13 +135,12 @@ where
|
||||||
let mut server_config_h3 = QuicServerConfig::with_crypto(Arc::new(rustls_server_config));
|
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.transport = Arc::new(transport_config_quic);
|
||||||
server_config_h3.concurrent_connections(self.globals.h3_max_concurrent_connections);
|
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, mut incoming) = Endpoint::server(server_config_h3, self.listening_on)?;
|
||||||
let endpoint = Endpoint::server(server_config_h3, self.listening_on)?;
|
|
||||||
|
|
||||||
let mut server_crypto: Option<Arc<ServerCrypto>> = None;
|
let mut server_crypto: Option<Arc<ServerCrypto>> = None;
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
new_conn = endpoint.accept() => {
|
new_conn = incoming.next() => {
|
||||||
if server_crypto.is_none() || new_conn.is_none() {
|
if server_crypto.is_none() || new_conn.is_none() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue