- 改进 ui 界面
 - 修复流量超出后账号不自动失效问题
 - 修复vless生成的链接不正确问题
 - 修复网页端重启面板功能问题
This commit is contained in:
sprov
2021-06-15 11:10:39 +08:00
parent 5cc4cf02ee
commit e91daabb18
13 changed files with 303 additions and 59 deletions

View File

@@ -54,6 +54,38 @@ class DBInbound {
this.total = toFixed(gb * ONE_GB, 0);
}
get isVMess() {
return this.protocol === Protocols.VMESS;
}
get isVLess() {
return this.protocol === Protocols.VLESS;
}
get isTrojan() {
return this.protocol === Protocols.TROJAN;
}
get isSS() {
return this.protocol === Protocols.SHADOWSOCKS;
}
get isSocks() {
return this.protocol === Protocols.SOCKS;
}
get isHTTP() {
return this.protocol === Protocols.HTTP;
}
get address() {
let address = location.hostname;
if (!ObjectUtil.isEmpty(this.listen) && this.listen !== "0.0.0.0") {
address = this.listen;
}
return address;
}
toInbound() {
let settings = {};
if (!ObjectUtil.isEmpty(this.settings)) {
@@ -93,9 +125,9 @@ class DBInbound {
}
}
genLink(address = "") {
genLink() {
const inbound = this.toInbound();
return inbound.genLink(address, this.remark);
return inbound.genLink(this.address, this.remark);
}
}