Refactor application structure and simplify implementation

This commit is contained in:
2026-07-22 00:08:09 +03:00
parent dbba3806cc
commit 90b2eb507c
74 changed files with 11362 additions and 6814 deletions
@@ -83,6 +83,35 @@ fn includes_folder_paths_when_generating_proxifyre_config() {
);
}
#[test]
fn deduplicates_windows_app_names_case_insensitively() {
let adapter = ProxiFyreAdapter::default();
let mut profile = discord_profile("home-gateway");
profile.items.extend([
ProfileItem {
item_type: ProfileItemType::Process,
value: "discord".to_string(),
recursive: false,
},
ProfileItem {
item_type: ProfileItemType::Exe,
value: "DISCORD".to_string(),
recursive: false,
},
]);
let profiles = vec![profile];
let targets = vec![external_socks5_target()];
let generated = adapter
.generate_config(ProxyRouterRequest::new(&profiles, &targets, &[]))
.expect("Windows app names should generate");
let config: ProxiFyreConfig =
serde_json::from_str(&generated.contents).expect("generated config json");
assert_eq!(config.proxies[0].app_names, vec!["Discord"]);
assert_eq!(generated.routed_apps, 1);
}
#[test]
fn blocks_local_singbox_target_when_required_component_is_missing() {
let adapter = ProxiFyreAdapter::default();