From 72935e7ee03542c757abdb9720be45440ed5907a Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 16 Mar 2026 13:54:56 +0000 Subject: [PATCH] fix(rustproxy-http): implement vectored write support for backend streams --- changelog.md | 6 ++++++ .../crates/rustproxy-http/src/proxy_service.rs | 18 ++++++++++++++++++ ts/00_commitinfo_data.ts | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index c765dcf..63bde2a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-03-16 - 25.11.15 - fix(rustproxy-http) +implement vectored write support for backend streams + +- Add poll_write_vectored forwarding for both plain and TLS backend stream variants +- Expose is_write_vectored so the proxy can correctly report vectored write capability + ## 2026-03-16 - 25.11.14 - fix(rustproxy-http) forward vectored write support in ShutdownOnDrop AsyncWrite wrapper diff --git a/rust/crates/rustproxy-http/src/proxy_service.rs b/rust/crates/rustproxy-http/src/proxy_service.rs index 0629d27..6e58ffe 100644 --- a/rust/crates/rustproxy-http/src/proxy_service.rs +++ b/rust/crates/rustproxy-http/src/proxy_service.rs @@ -109,6 +109,24 @@ impl tokio::io::AsyncWrite for BackendStream { } } + fn poll_write_vectored( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + bufs: &[std::io::IoSlice<'_>], + ) -> Poll> { + match self.get_mut() { + BackendStream::Plain(s) => Pin::new(s).poll_write_vectored(cx, bufs), + BackendStream::Tls(s) => Pin::new(s).poll_write_vectored(cx, bufs), + } + } + + fn is_write_vectored(&self) -> bool { + match self { + BackendStream::Plain(s) => s.is_write_vectored(), + BackendStream::Tls(s) => s.is_write_vectored(), + } + } + fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { match self.get_mut() { BackendStream::Plain(s) => Pin::new(s).poll_flush(cx), diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index f76ad0a..a40e036 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartproxy', - version: '25.11.14', + version: '25.11.15', description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.' }