完成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

@@ -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;
}
}