mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-15 19:22:26 +08:00
fix: start param error
This commit is contained in:
parent
1f197965e0
commit
56078098a4
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue
Block a user