mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 01:33:45 +08:00
fix: start param error
This commit is contained in:
parent
bf35c92c14
commit
8c2a4e627e
@ -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…
x
Reference in New Issue
Block a user