mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-20 15:55:48 +00:00
0.1.0
- 改进 ui 界面 - 修复流量超出后账号不自动失效问题 - 修复vless生成的链接不正确问题 - 修复网页端重启面板功能问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user