规范依赖管理并适配 rand 0.10

- tcp_ip 从 git 依赖切换为 crates.io 0.2(IpStackConfig 改用 builder)
- 公共依赖收拢到 workspace.dependencies 统一版本
- 移除 release profile 的 panic=abort(避免 vnt-jni 中止宿主 JVM)
- vnt-jni 升级 edition 2024(no_mangle 改为 unsafe(no_mangle))
- vnt-ipc 显式声明 tokio features
- 适配 rand 0.10:random_range 移至 RngExt,choose_multiple 改名 sample
- 修复 clippy 警告(type_complexity/collapsible_if/ptr_arg)
This commit is contained in:
lbl
2026-08-20 20:58:07 +08:00
parent e088d305b1
commit 7d481560e3
14 changed files with 258 additions and 162 deletions
+1 -4
View File
@@ -34,10 +34,7 @@ impl InternalNatInbound {
network: SharedNetworkAddr,
no_tun: bool,
) -> anyhow::Result<Self> {
let ip_stack_config = IpStackConfig {
mtu,
..Default::default()
};
let ip_stack_config = IpStackConfig::builder().mtu(mtu).build();
let (ip_stack, ip_stack_send, ip_stack_recv) = tcp_ip::ip_stack(ip_stack_config)?;
#[cfg(not(target_os = "android"))]
icmp_nat::start_icmp_nat(task_group, &ip_stack, no_tun, network.clone()).await?;