mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
fix: 哪吒探针在线时长
This commit is contained in:
parent
8cbb4492be
commit
c91d8e28e4
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.301",
|
"version": "2.14.303",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -469,7 +469,11 @@ function nezhaTransform(output) {
|
|||||||
// 简单判断下
|
// 简单判断下
|
||||||
if (/^[a-z]{2}$/i.test(CountryCode)) {
|
if (/^[a-z]{2}$/i.test(CountryCode)) {
|
||||||
// 如果节点上有数据 就取节点上的数据
|
// 如果节点上有数据 就取节点上的数据
|
||||||
let time = proxy._unavailable ? 0 : Date.now();
|
let now = Math.round(new Date().getTime() / 1000);
|
||||||
|
let time = proxy._unavailable ? 0 : now;
|
||||||
|
|
||||||
|
const uptime = parseInt(proxy._uptime || 0, 10);
|
||||||
|
|
||||||
result.result.push({
|
result.result.push({
|
||||||
id: index,
|
id: index,
|
||||||
name: proxy.name,
|
name: proxy.name,
|
||||||
@ -489,7 +493,7 @@ function nezhaTransform(output) {
|
|||||||
SwapTotal: 1024,
|
SwapTotal: 1024,
|
||||||
Arch: '',
|
Arch: '',
|
||||||
Virtualization: '',
|
Virtualization: '',
|
||||||
BootTime: time,
|
BootTime: now - uptime,
|
||||||
CountryCode, // 目前需要
|
CountryCode, // 目前需要
|
||||||
Version: '0.0.1',
|
Version: '0.0.1',
|
||||||
},
|
},
|
||||||
@ -502,7 +506,7 @@ function nezhaTransform(output) {
|
|||||||
NetOutTransfer: 0,
|
NetOutTransfer: 0,
|
||||||
NetInSpeed: 0,
|
NetInSpeed: 0,
|
||||||
NetOutSpeed: 0,
|
NetOutSpeed: 0,
|
||||||
Uptime: parseInt(proxy._uptime ?? index, 10),
|
Uptime: uptime,
|
||||||
Load1: 0,
|
Load1: 0,
|
||||||
Load5: 0,
|
Load5: 0,
|
||||||
Load15: 0,
|
Load15: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user