smoltcp use larger tx/rx buf size (#1085)

* smoltcp use larger tx/rx buf size
* fix direct conn check
This commit is contained in:
Sijie.Sun
2025-07-06 10:53:01 +08:00
committed by GitHub
parent f85b031402
commit 3c65594030
4 changed files with 22 additions and 3 deletions
+7
View File
@@ -523,6 +523,8 @@ impl<C: NatDstConnector> TcpProxy<C> {
|| cfg!(any(target_os = "android", target_env = "ohos"))
{
// use smoltcp network stack
use crate::gateway::tokio_smoltcp::BufferSize;
self.local_port
.store(8899, std::sync::atomic::Ordering::Relaxed);
@@ -573,6 +575,11 @@ impl<C: NatDstConnector> TcpProxy<C> {
.parse()
.unwrap(),
vec![format!("{}", self.get_local_ip().unwrap()).parse().unwrap()],
Some(BufferSize {
tcp_rx_size: 1024 * 16,
tcp_tx_size: 1024 * 16,
..Default::default()
}),
),
);
net.set_any_ip(true);