Refactor VPN proxy routing and session handling

This commit is contained in:
2026-07-07 22:07:17 +03:00
parent 59f2264a2e
commit 7dbf786c56
25 changed files with 1921 additions and 236 deletions

View File

@@ -1,9 +1,9 @@
#[path = "../src/activity.rs"]
mod activity;
#[path = "../src/component_detection.rs"]
mod component_detection;
#[path = "../src/commands.rs"]
mod commands;
#[path = "../src/component_detection.rs"]
mod component_detection;
#[path = "../src/models.rs"]
mod models;
#[path = "../src/adapters/proxifyre.rs"]
@@ -17,9 +17,9 @@ mod validation;
use commands::{
apply_profiles_with_services, build_status, resolve_component_statuses, resolve_preview,
save_profile_to_storage, save_target_to_storage, Clock, CommandError,
DetectedProxyApplyHelper, HelperApplyRequest, HelperApplyResult, ProfileInputDto,
ProfileItemInputDto, ProxyApplyHelper, TargetInputDto,
save_profile_to_storage, save_target_to_storage, Clock, CommandError, DetectedProxyApplyHelper,
HelperApplyRequest, HelperApplyResult, ProfileInputDto, ProfileItemInputDto, ProxyApplyHelper,
TargetInputDto,
};
use component_detection::{
DetectedProxyfier, ProxyfierDetectionHost, ProxyfierEngine, RegistryInstallEntry,
@@ -240,8 +240,8 @@ fn detected_proxy_apply_helper_writes_proxifyre_app_config() {
})
.expect("detected helper should apply");
let applied = fs::read_to_string(install_dir.join("app-config.json"))
.expect("read applied app-config");
let applied =
fs::read_to_string(install_dir.join("app-config.json")).expect("read applied app-config");
assert!(result.success);
assert!(result.changed);
@@ -276,7 +276,9 @@ fn detected_proxy_apply_helper_ignores_plain_proxifier_install() {
assert!(result.success);
assert!(result.changed);
assert_eq!(result.action, "proxifyre.stage-generated-config");
assert!(result.message.contains("совместимая установка ProxiFyre не найдена"));
assert!(result
.message
.contains("совместимая установка ProxiFyre не найдена"));
cleanup(&root);
}
@@ -358,7 +360,10 @@ impl ProxyfierDetectionHost for DetectionHost {
}
fn normalize_path(path: &Path) -> String {
path.display().to_string().replace('/', "\\").to_ascii_lowercase()
path.display()
.to_string()
.replace('/', "\\")
.to_ascii_lowercase()
}
fn test_root(name: &str) -> PathBuf {