feat: clash tun mode supports

This commit is contained in:
GyDi
2022-02-25 02:09:39 +08:00
parent 961ed728a1
commit acb5fc6393
6 changed files with 95 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ pub struct VergeConfig {
/// enable traffic graph default is true
pub traffic_graph: Option<bool>,
/// clash tun mode
pub enable_tun_mode: Option<bool>,
/// can the app auto startup
pub enable_auto_launch: Option<bool>,
@@ -258,6 +261,11 @@ impl Verge {
Verge::guard_proxy(self.guard_state.clone());
}
// handle the tun mode
if patch.enable_tun_mode.is_some() {
self.config.enable_tun_mode = patch.enable_tun_mode;
}
self.config.save_file()
}
}