diff --git a/leaf/Cargo.toml b/leaf/Cargo.toml index 6dc913a49..3ff8d1829 100644 --- a/leaf/Cargo.toml +++ b/leaf/Cargo.toml @@ -252,7 +252,7 @@ jni = "0.21" # TUN [target.'cfg(any(target_os = "ios", target_os = "android", target_os = "macos", target_os = "linux"))'.dependencies] tun = { git = "https://github.com/eycorsican/rust-tun.git", branch = "fork", features = ["async"], optional = true } -netstack-lwip = { git = "https://github.com/eycorsican/netstack-lwip.git", rev = "9c7f2e3", optional = true } +netstack-lwip = { git = "https://github.com/eycorsican/netstack-lwip.git", rev = "9463bdf", optional = true } [target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies] pnet_datalink = { version = "0.34", package = "pnet_datalink", optional = true } diff --git a/leaf/src/proxy/tun/inbound.rs b/leaf/src/proxy/tun/inbound.rs index 34a88c2f9..939564934 100644 --- a/leaf/src/proxy/tun/inbound.rs +++ b/leaf/src/proxy/tun/inbound.rs @@ -1,4 +1,5 @@ use std::net::SocketAddr; +use std::pin::Pin; use std::sync::Arc; use anyhow::{anyhow, Result}; @@ -23,7 +24,7 @@ use crate::{ use super::netstack; async fn handle_inbound_stream( - stream: netstack::TcpStream, + stream: Pin>, local_addr: SocketAddr, remote_addr: SocketAddr, inbound_tag: String, @@ -61,7 +62,7 @@ async fn handle_inbound_stream( } async fn handle_inbound_datagram( - socket: Box, + socket: Pin>, inbound_tag: String, nat_manager: Arc, fakedns: Arc, diff --git a/leaf/src/proxy/vmess/crypto.rs b/leaf/src/proxy/vmess/crypto.rs index af4310fee..5d79fc7ef 100644 --- a/leaf/src/proxy/vmess/crypto.rs +++ b/leaf/src/proxy/vmess/crypto.rs @@ -116,15 +116,10 @@ impl ShakeSizeParser { pub trait PaddingLengthGenerator { fn next_padding_len(&mut self) -> u16; - fn max_padding_len(&self) -> u16; } impl PaddingLengthGenerator for ShakeSizeParser { fn next_padding_len(&mut self) -> u16 { self.next() % 64 } - - fn max_padding_len(&self) -> u16 { - 64 - } }