diff --git a/database/model/model.go b/database/model/model.go index d0b8bcfc..c1079914 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -74,4 +74,7 @@ type Client struct { Email string `json:"email"` TotalGB int64 `json:"totalGB" form:"totalGB"` ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` + Enable bool `json:"enable" from:"enable"` + TgID string `json:"tgId" from:"tgId"` + SubID string `json:"subId" from:"subId"` } diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 79186e32..93693e33 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1431,13 +1431,16 @@ Inbound.VmessSettings = class extends Inbound.Settings { } }; Inbound.VmessSettings.Vmess = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime='') { + constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.id = id; this.alterId = alterId; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; + this.enable = enable; + this.tgId = tgId; + this.subId = subId; } static fromJson(json={}) { @@ -1447,7 +1450,9 @@ Inbound.VmessSettings.Vmess = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, - + json.enable, + json.tgId, + json.subId, ); } get _expiryTime() { @@ -1513,15 +1518,16 @@ Inbound.VLESSSettings = class extends Inbound.Settings { }; Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { - - constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') { + constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.id = id; this.flow = flow; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; - + this.enable = enable; + this.tgId = tgId; + this.subId = subId; } static fromJson(json={}) { @@ -1531,6 +1537,9 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, + json.enable, + json.tgId, + json.subId, ); } @@ -1627,13 +1636,16 @@ Inbound.TrojanSettings = class extends Inbound.Settings { } }; Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { - constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') { + constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.password = password; this.flow = flow; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; + this.enable = enable; + this.tgId = tgId; + this.subId = subId; } toJson() { @@ -1643,6 +1655,9 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { email: this.email, totalGB: this.totalGB, expiryTime: this.expiryTime, + enable: this.enable, + tgId: this.tgId, + subId: this.subId, }; } @@ -1653,7 +1668,9 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, - + json.enable, + json.tgId, + json.subId, ); }