From 10d75a49a3b964e7d3590a6d3d80e28b2d78a4cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com>
Date: Tue, 5 Nov 2024 11:41:47 +0800
Subject: [PATCH] =?UTF-8?q?optimize:=20=E6=85=A2=E9=80=9FIP=E7=9A=84?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=8C=96=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/core/src/config/index.js | 5 ++++-
packages/gui/src/view/pages/server.vue | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js
index e1dbbf0..bfa1f4d 100644
--- a/packages/core/src/config/index.js
+++ b/packages/core/src/config/index.js
@@ -65,7 +65,10 @@ module.exports = {
timeout: 20000,
keepAliveTimeout: 30000
}
- }
+ },
+
+ // 慢速IP延迟时间:测速超过该值时,则视为延迟高,显示为橙色
+ lowSpeedDelay: 150
},
compatible: {
// **** 自定义兼容配置 **** //
diff --git a/packages/gui/src/view/pages/server.vue b/packages/gui/src/view/pages/server.vue
index d2355c1..b96d7d6 100644
--- a/packages/gui/src/view/pages/server.vue
+++ b/packages/gui/src/view/pages/server.vue
@@ -211,7 +211,7 @@
+ :color="element.time?(element.time>config.server.setting.lowSpeedDelay?'orange':'green'):'red'" :key='index'>
{{ element.host }} {{ element.time }}{{ element.time ? 'ms' : '' }} {{ element.dns }}