feat: auto close connection when proxy changed

This commit is contained in:
GyDi
2022-11-10 01:27:05 +08:00
parent aa23ed892b
commit 32095daf90
9 changed files with 175 additions and 3 deletions

View File

@@ -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()
}
}