diff --git a/src/components/menu.ts b/src/components/menu.ts
index 3b9818b..a8c4085 100644
--- a/src/components/menu.ts
+++ b/src/components/menu.ts
@@ -109,6 +109,12 @@ export const menuData: Menus[] = [
index: '/vpn-policy',
title: 'VPN策略',
},
+ {
+ id: '757',
+ pid: '75',
+ index: '/vpn-status',
+ title: 'VPN服务器状态',
+ },
],
},
{
diff --git a/src/router/index.ts b/src/router/index.ts
index 18d4fb8..6b9d0e6 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -178,10 +178,19 @@ const routes: RouteRecordRaw[] = [
name: 'vpn-policy',
meta: {
title: 'VPN策略',
- permiss: '755',
+ permiss: '756',
},
component: () => import(/* webpackChunkName: "system-user" */ '../views/system/vpn-policy.vue'),
},
+ {
+ path: '/vpn-status',
+ name: 'vpn-status',
+ meta: {
+ title: 'VPN服务器状态',
+ permiss: '757',
+ },
+ component: () => import(/* webpackChunkName: "system-user" */ '../views/system/vpn-server-status.vue'),
+ },
{
path: '/callback',
diff --git a/src/store/permiss.ts b/src/store/permiss.ts
index 9ee785b..5d048e4 100644
--- a/src/store/permiss.ts
+++ b/src/store/permiss.ts
@@ -67,6 +67,7 @@ export const usePermissStore = defineStore("permiss", {
"754", //VPN客户端UI
"755", //VPN在线用户连接
"756", //VPN策略
+ "757", //VPN服务器状态
],
user: ["0", "8", "7", "9", "51" ,"53","55" ,"56", "57", "58", "59", "61", "71", "754"],
},
diff --git a/src/views/system/vpn-server-status.vue b/src/views/system/vpn-server-status.vue
new file mode 100644
index 0000000..78077ca
--- /dev/null
+++ b/src/views/system/vpn-server-status.vue
@@ -0,0 +1,396 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ server.name }}
+
+
{{ server.server_ip }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ selectedServer.name }}
+
+
+ {{ selectedServer.server_id }}
+
+
+ {{ selectedServer.vpn_status.receive_packets }}
+
+
+ {{ selectedServer.vpn_status.send_packets }}
+
+
+ {{ formatBytes(selectedServer.vpn_status.receive_bytes) }}
+
+
+ {{ formatBytes(selectedServer.vpn_status.send_bytes) }}
+
+
+ ↓ {{ formatRate(serverRate.download) }}
+
+
+ ↑ {{ formatRate(serverRate.upload) }}
+
+
+ {{ selectedServer.vpn_status.online_user_info?.length || 0 }}
+
+
+
+ 在线用户
+
+
+
+
+
+
+
+
+ {{ formatBytes(row.upload_bytes) }}
+
+
+
+
+ {{ formatBytes(row.download_bytes) }}
+
+
+
+
+ ↑ {{ formatRate(getUserRate(row.session_id).upload) }}
+
+
+
+
+ ↓ {{ formatRate(getUserRate(row.session_id).download) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+