fix: start param error

This commit is contained in:
MystiPanda 2024-06-09 20:00:17 +08:00 committed by GitHub
parent 1f197965e0
commit 56078098a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,12 +28,14 @@ pub fn check_singleton() -> Result<()> {
let argvs: Vec<String> = std::env::args().collect();
if argvs.len() > 1 {
let param = argvs[1].as_str();
reqwest::get(format!(
if param.starts_with("clash:") {
reqwest::get(format!(
"http://127.0.0.1:{port}/commands/scheme?param={param}"
))
.await?
.text()
.await?;
))
.await?
.text()
.await?;
}
} else {
reqwest::get(format!("http://127.0.0.1:{port}/commands/visible"))
.await?