From 67a3242b88aaa6af968fe69f8818d7053c0bfc2e Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sun, 22 Oct 2023 14:09:25 +0800 Subject: [PATCH] Buffer size --- src/tun2proxy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tun2proxy.rs b/src/tun2proxy.rs index 2b61086..7b5ed9d 100644 --- a/src/tun2proxy.rs +++ b/src/tun2proxy.rs @@ -792,8 +792,8 @@ impl<'a> TunToProxy<'a> { #[cfg(any(target_os = "ios", target_os = "macos", target_os = "windows"))] let mut socket = tcp::Socket::new( // TODO: Look into how the buffer size affects IP header length and fragmentation - tcp::SocketBuffer::new(vec![0; 1024]), - tcp::SocketBuffer::new(vec![0; 1024]), + tcp::SocketBuffer::new(vec![0; 1024 * 2]), + tcp::SocketBuffer::new(vec![0; 1024 * 2]), ); socket.set_ack_delay(None); socket.listen(dst)?;