mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: runtime config viewer
This commit is contained in:
@@ -174,6 +174,13 @@ pub fn get_clash_info(core: State<'_, Core>) -> CmdResult<ClashInfo> {
|
||||
Ok(clash.info.clone())
|
||||
}
|
||||
|
||||
/// get the running clash config string
|
||||
#[tauri::command]
|
||||
pub fn get_running_config(core: State<'_, Core>) -> CmdResult<Option<String>> {
|
||||
let clash = core.clash.lock();
|
||||
Ok(clash.running_config.clone())
|
||||
}
|
||||
|
||||
/// update the clash core config
|
||||
/// after putting the change to the clash core
|
||||
/// then we should save the latest config
|
||||
|
||||
Reference in New Issue
Block a user