fix: pass mtu to tun2socks

This commit is contained in:
ospab 2026-05-21 03:00:44 +03:00
parent c957a3a395
commit 921533f560
1 changed files with 7 additions and 2 deletions

View File

@ -208,8 +208,13 @@ pub extern "system" fn Java_net_ostp_client_OstpClientSdk_startClient(
cmd.arg("-device") cmd.arg("-device")
.arg(&fd_str) .arg(&fd_str)
.arg("-proxy") .arg("-proxy")
.arg(&proxy_str) .arg(&proxy_str);
.stdout(std::process::Stdio::piped())
if config.ostp.mtu > 0 {
cmd.arg("-mtu").arg(config.ostp.mtu.to_string());
}
cmd.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped()); .stderr(std::process::Stdio::piped());
let mut child = match cmd.spawn() { let mut child = match cmd.spawn() {