mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 06:58:32 +08:00
feat: auto close connection when proxy changed
This commit is contained in:
1 parent
aa23ed892b
commit
32095daf90
9 files changed
+175
-3
No files matched your search
@@ -60,6 +60,12 @@ pub struct Verge {
|
||||
/// hotkey map
|
||||
/// format: {func},{key}
|
||||
pub hotkeys: Option<Vec<String>>,
|
||||
|
||||
/// 切换代理时自动关闭连接
|
||||
pub auto_close_connection: Option<bool>,
|
||||
|
||||
/// 默认的延迟测试连接
|
||||
pub default_latency_test: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
||||
@@ -122,6 +128,9 @@ impl Verge {
|
||||
patch!(clash_core);
|
||||
patch!(hotkeys);
|
||||
|
||||
patch!(auto_close_connection);
|
||||
patch!(default_latency_test);
|
||||
|
||||
self.save_file()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user