feat: macos system tray addition rate display

This commit is contained in:
huzibaca
2024-12-31 04:42:55 +08:00
parent 53334f05b8
commit 97864e8df3
13 changed files with 610 additions and 333 deletions
+6
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 {}'""#;