revert to quinn-0.8.5
This commit is contained in:
parent
6f7cb41b61
commit
d9f5b60551
2 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue