mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-22 14:59:09 +00:00
FIXME: buffer size too small
This commit is contained in:
parent
82739f693a
commit
75ae6e39e7
1 changed files with 6 additions and 0 deletions
|
@ -784,6 +784,12 @@ impl<'a> TunToProxy<'a> {
|
||||||
proxy_handler: Box<dyn ProxyHandler>,
|
proxy_handler: Box<dyn ProxyHandler>,
|
||||||
udp_associate: bool,
|
udp_associate: bool,
|
||||||
) -> Result<ConnectionState> {
|
) -> Result<ConnectionState> {
|
||||||
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
|
let mut socket = tcp::Socket::new(
|
||||||
|
tcp::SocketBuffer::new(vec![0; 1024 * 128]),
|
||||||
|
tcp::SocketBuffer::new(vec![0; 1024 * 128]),
|
||||||
|
);
|
||||||
|
#[cfg(any(target_os = "ios", target_os = "macos", target_os = "windows"))]
|
||||||
let mut socket = tcp::Socket::new(
|
let mut socket = tcp::Socket::new(
|
||||||
// TODO: Look into how the buffer size affects IP header length and fragmentation
|
// 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]),
|
||||||
|
|
Loading…
Add table
Reference in a new issue