fix: Gateway status detection false-negative when command line unreadable (permissions)

- dev-api.js: treat unreadable PIDs as potential Gateway instead of foreign
- dev-api.js: add TCP probe fallback in get_services_status for all platforms
- service.rs: same fix in Tauri side inspect_port_owners
This commit is contained in:
晴天
2026-03-10 23:18:08 +08:00
parent ac0d9920b5
commit de5a8706da
3 changed files with 22 additions and 4 deletions

2
src-tauri/Cargo.lock generated
View File

@@ -328,7 +328,7 @@ dependencies = [
[[package]]
name = "clawpanel"
version = "0.7.2"
version = "0.7.3"
dependencies = [
"base64 0.22.1",
"chrono",

View File

@@ -724,7 +724,13 @@ mod platform {
Some(command_line) if super::looks_like_gateway_command_line(&command_line) => {
gateway_pids.push(pid);
}
_ => foreign_pids.push(pid),
Some(command_line) if !command_line.is_empty() => {
foreign_pids.push(pid);
}
_ => {
// 命令行读不到时,假定为 Gateway避免权限问题导致误报
gateway_pids.push(pid);
}
}
}