From 62c5a96cd9ab6276056b31f00751c72f9bedd23e Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 8 Apr 2026 20:46:58 -0400 Subject: [PATCH] resume destination upon new incoming connection in HTTP and SOCKS proxy --- libi2pd_client/HTTPProxy.cpp | 1 + libi2pd_client/I2PService.cpp | 1 + libi2pd_client/SOCKS.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/libi2pd_client/HTTPProxy.cpp b/libi2pd_client/HTTPProxy.cpp index 91c8abbb..9cf7a1df 100644 --- a/libi2pd_client/HTTPProxy.cpp +++ b/libi2pd_client/HTTPProxy.cpp @@ -538,6 +538,7 @@ namespace proxy m_send_buf.append(m_recv_buf); /* connect to destination */ LogPrint(eLogDebug, "HTTPProxy: Connecting to host ", dest_host, ":", dest_port); + GetOwner ()->UpdateLastActivityTime (); GetOwner()->CreateStream (std::bind (&HTTPReqHandler::HandleStreamRequestComplete, shared_from_this(), std::placeholders::_1), dest_host, dest_port); return true; diff --git a/libi2pd_client/I2PService.cpp b/libi2pd_client/I2PService.cpp index 7595ee9e..2e09d49a 100644 --- a/libi2pd_client/I2PService.cpp +++ b/libi2pd_client/I2PService.cpp @@ -61,6 +61,7 @@ namespace client if (m_CloseIdleTime) { if (!m_IdleCheckTimer) m_IdleCheckTimer.reset (new boost::asio::steady_timer(m_LocalDestination->GetService ())); + m_LastActivityTime = i2p::util::GetMonotonicMilliseconds (); ScheduleIdleCheckTimer (); } } diff --git a/libi2pd_client/SOCKS.cpp b/libi2pd_client/SOCKS.cpp index 6105e819..c9b3840b 100644 --- a/libi2pd_client/SOCKS.cpp +++ b/libi2pd_client/SOCKS.cpp @@ -646,6 +646,7 @@ namespace proxy { case CMD_CONNECT: //make an i2p session + GetOwner ()->UpdateLastActivityTime (); GetOwner()->CreateStream ( std::bind (&SOCKSHandler::HandleStreamRequestComplete, shared_from_this(), std::placeholders::_1), m_address.dns.ToString(), m_port); break;