From b8f3034014231b8aab945f027a499c3773b653fc Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 11 Dec 2023 18:40:31 +0900 Subject: [PATCH] wip: fix keep alive timeouts --- rpxy-lib/Cargo.toml | 1 + rpxy-lib/src/hyper_ext/mod.rs | 2 ++ rpxy-lib/src/proxy/mod.rs | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 65c7c589..f30f4bb0 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,6 +41,7 @@ tokio = { version = "1.34.0", default-features = false, features = [ "macros", "fs", ] } +pin-project-lite = "0.2.13" async-trait = "0.1.74" # Error handling diff --git a/rpxy-lib/src/hyper_ext/mod.rs b/rpxy-lib/src/hyper_ext/mod.rs index e6c81e74..cfa2b70d 100644 --- a/rpxy-lib/src/hyper_ext/mod.rs +++ b/rpxy-lib/src/hyper_ext/mod.rs @@ -1,10 +1,12 @@ mod body_incoming_like; mod body_type; mod executor; +mod tokio_timer; mod watch; pub(crate) mod rt { pub(crate) use super::executor::LocalExecutor; + pub(crate) use super::tokio_timer::{TokioSleep, TokioTimer}; } pub(crate) mod body { pub(crate) use super::body_incoming_like::IncomingLike; diff --git a/rpxy-lib/src/proxy/mod.rs b/rpxy-lib/src/proxy/mod.rs index d1aa5c34..a7c1ec86 100644 --- a/rpxy-lib/src/proxy/mod.rs +++ b/rpxy-lib/src/proxy/mod.rs @@ -6,7 +6,10 @@ mod proxy_quic_quinn; mod proxy_quic_s2n; mod socket; -use crate::{globals::Globals, hyper_ext::rt::LocalExecutor}; +use crate::{ + globals::Globals, + hyper_ext::rt::{LocalExecutor, TokioTimer}, +}; use hyper_util::server::{self, conn::auto::Builder as ConnectionBuilder}; use std::sync::Arc; @@ -20,10 +23,12 @@ pub(crate) fn connection_builder(globals: &Arc) -> Arc