Refactor proxy handling and update related UI flows

This commit is contained in:
2026-07-08 09:01:10 +03:00
parent b45dd2ae05
commit 288acbf0c8
14 changed files with 2655 additions and 552 deletions

View File

@@ -37,6 +37,7 @@ use models::{
use proxifyre::ProxiFyreAdapter;
use std::collections::HashSet;
use std::fs;
use std::net::TcpListener;
use std::path::{Path, PathBuf};
#[cfg(windows)]
use std::process::Command as ProcessCommand;
@@ -127,6 +128,24 @@ fn resolve_preview_returns_structured_apps_without_filesystem_scan() {
.any(|warning| warning.contains("Сканирование папок отложено")));
}
#[test]
fn ping_proxy_target_reports_open_tcp_endpoint() {
let listener = TcpListener::bind("127.0.0.1:0").expect("bind local listener");
let port = listener.local_addr().expect("read local addr").port();
let result = commands::ping_proxy_target_endpoint(commands::PingProxyTargetInputDto {
host: "127.0.0.1".to_string(),
port,
})
.expect("ping should return response");
assert_eq!(result.tag, "external-proxy");
assert_eq!(result.server, "127.0.0.1");
assert_eq!(result.server_port, port);
assert!(result.ok);
assert!(result.latency.is_some());
}
#[test]
#[cfg(windows)]
fn proxifyre_install_script_parses_as_powershell() {