mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: better service status and TUN mode usable checks in Setting Page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::fmt;
|
||||
use std::fmt::{self, write};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Type {
|
||||
@@ -16,6 +16,7 @@ pub enum Type {
|
||||
Backup,
|
||||
Lightweight,
|
||||
Network,
|
||||
ProxyMode,
|
||||
}
|
||||
|
||||
impl fmt::Display for Type {
|
||||
@@ -35,6 +36,7 @@ impl fmt::Display for Type {
|
||||
Type::Backup => write!(f, "[Backup]"),
|
||||
Type::Lightweight => write!(f, "[Lightweight]"),
|
||||
Type::Network => write!(f, "[Network]"),
|
||||
Type::ProxyMode => write!(f, "[ProxMode]"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
use anyhow::Result;
|
||||
use lazy_static::lazy_static;
|
||||
use reqwest::{Client, ClientBuilder, Proxy, RequestBuilder, Response};
|
||||
use std::sync::{Arc, Mutex, Once};
|
||||
use std::time::{Duration, Instant};
|
||||
use std::{
|
||||
sync::{Arc, Mutex, Once},
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use tokio::runtime::{Builder, Runtime};
|
||||
|
||||
use crate::{config::Config, logging, utils::logging::Type};
|
||||
|
||||
Reference in New Issue
Block a user