完成xray启动

This commit is contained in:
sprov
2021-05-27 23:04:39 +08:00
parent 56ed8f355c
commit 3cd25ce5ea
42 changed files with 3627 additions and 229 deletions

View File

@@ -19,4 +19,28 @@ class Msg {
this.obj = obj;
}
}
}
class DBInbound {
id = 0;
userId = 0;
up = 0;
down = 0;
remark = 0;
enable = false;
expiryTime = 0;
listen = "";
port = 0;
protocol = "";
settings = "";
streamSettings = "";
tag = "";
sniffing = "";
constructor(data) {
if (data == null) {
return;
}
ObjectUtil.cloneProps(this, data);
}
}

1192
web/assets/js/model/xray.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -135,7 +135,7 @@ class DateUtil {
}
static formatMillis(millis) {
return moment(millis).format('YYYY年M月D日 H时m分s秒')
return moment(millis).format('YYYY-M-D H:m:s')
}
static firstDayOfMonth() {

View File

@@ -13,7 +13,7 @@ class HttpUtil {
}
}
static async _respToMsg(resp) {
static _respToMsg(resp) {
const data = resp.data;
if (data == null) {
return new Msg(true);
@@ -227,6 +227,10 @@ class ObjectUtil {
for (const key of Object.keys(src)) {
if (!src.hasOwnProperty(key)) {
continue;
} else if (!dest.hasOwnProperty(key)) {
continue;
} else if (src[key] === undefined) {
continue;
}
if (ignoreEmpty) {
dest[key] = src[key];
@@ -259,4 +263,11 @@ class ObjectUtil {
}
}
static orDefault(obj, defaultValue) {
if (obj == null) {
return defaultValue;
}
return obj;
}
}