feat: better service status and TUN mode usable checks in Setting Page

This commit is contained in:
Tunglies
2025-05-12 19:04:08 +08:00
parent d587ed09a5
commit 5b6c9be99f
14 changed files with 127 additions and 88 deletions

View File

@@ -240,8 +240,10 @@ pub struct Traffic {
impl Traffic {
pub async fn get_traffic_stream() -> Result<impl Stream<Item = Result<Traffic, anyhow::Error>>>
{
use futures::future::FutureExt;
use futures::stream::{self, StreamExt};
use futures::{
future::FutureExt,
stream::{self, StreamExt},
};
use std::time::Duration;
// 先处理错误和超时情况