feat: macos system tray addition rate display

This commit is contained in:
huzibaca
2024-12-25 02:11:07 +08:00
parent 53334f05b8
commit 97864e8df3
13 changed files with 611 additions and 334 deletions

View File

@@ -123,6 +123,12 @@ pub fn parse_check_output(log: String) -> String {
log
}
pub fn get_traffic_ws_url() -> Result<String> {
let (url, _) = clash_client_info()?;
let ws_url = url.replace("http://", "ws://") + "/traffic";
Ok(ws_url)
}
#[test]
fn test_parse_check_output() {
let str1 = r#"xxxx\n time="2022-11-18T20:42:58+08:00" level=error msg="proxy 0: 'alpn' expected type 'string', got unconvertible type '[]interface {}'""#;