fix: vpn config discovery

This commit is contained in:
zhom
2026-04-16 13:32:29 +04:00
parent f338d08be1
commit 9f4bb594e4
7 changed files with 77 additions and 46 deletions
+4
View File
@@ -27,6 +27,10 @@ impl VpnWorkerConfig {
}
}
pub fn vpn_worker_config_path(id: &str) -> std::path::PathBuf {
get_storage_dir().join(format!("vpn_worker_{}.json", id))
}
pub fn save_vpn_worker_config(config: &VpnWorkerConfig) -> Result<(), Box<dyn std::error::Error>> {
let storage_dir = get_storage_dir();
fs::create_dir_all(&storage_dir)?;