feat: change system porxy when changed port

This commit is contained in:
GyDi
2022-01-21 02:50:13 +08:00
parent d0b87fd7c3
commit 47155a4a29
3 changed files with 38 additions and 4 deletions

View File

@@ -161,6 +161,24 @@ impl Verge {
}
}
// fn guard_thread(&mut self) -> Result<(), String> {
// let sysproxy = self.cur_sysproxy.clone();
// use std::{thread, time};
// tauri::async_runtime::spawn(async move {
// if let Some(sysproxy) = sysproxy {
// sysproxy.set_sys();
// }
// let ten_millis = time::Duration::from_millis(10);
// let now = time::Instant::now();
// thread::sleep(ten_millis);
// });
// Ok(())
// }
/// patch verge config
/// There should be only one update at a time here
/// so call the save_file at the end is savely