diff --git a/database/model/model.go b/database/model/model.go index 86ab0487..18211ef8 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -32,6 +32,7 @@ type Inbound struct { Up int64 `json:"up" form:"up"` Down int64 `json:"down" form:"down"` Total int64 `json:"total" form:"total"` + AllTime int64 `json:"allTime" form:"allTime" gorm:"default:0"` Remark string `json:"remark" form:"remark"` Enable bool `json:"enable" form:"enable"` ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` @@ -45,7 +46,6 @@ type Inbound struct { StreamSettings string `json:"streamSettings" form:"streamSettings"` Tag string `json:"tag" form:"tag" gorm:"unique"` Sniffing string `json:"sniffing" form:"sniffing"` - Allocate string `json:"allocate" form:"allocate"` } type OutboundTraffics struct { @@ -80,7 +80,6 @@ func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig { StreamSettings: json_util.RawMessage(i.StreamSettings), Tag: i.Tag, Sniffing: json_util.RawMessage(i.Sniffing), - Allocate: json_util.RawMessage(i.Allocate), } } diff --git a/web/assets/js/model/dbinbound.js b/web/assets/js/model/dbinbound.js index 45301ddd..acb62ce4 100644 --- a/web/assets/js/model/dbinbound.js +++ b/web/assets/js/model/dbinbound.js @@ -6,6 +6,7 @@ class DBInbound { this.up = 0; this.down = 0; this.total = 0; + this.allTime = 0; this.remark = ""; this.enable = true; this.expiryTime = 0; diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 33aa24e0..c91dbd11 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -1042,27 +1042,6 @@ class Sniffing extends XrayCommonClass { } } -class Allocate extends XrayCommonClass { - constructor( - strategy = "always", - refresh = 5, - concurrency = 3, - ) { - super(); - this.strategy = strategy; - this.refresh = refresh; - this.concurrency = concurrency; - } - - static fromJson(json = {}) { - return new Allocate( - json.strategy, - json.refresh, - json.concurrency, - ); - } -} - class Inbound extends XrayCommonClass { constructor( port = RandomUtil.randomInteger(10000, 60000), @@ -1072,7 +1051,6 @@ class Inbound extends XrayCommonClass { streamSettings = new StreamSettings(), tag = '', sniffing = new Sniffing(), - allocate = new Allocate(), clientStats = '', ) { super(); @@ -1083,7 +1061,6 @@ class Inbound extends XrayCommonClass { this.stream = streamSettings; this.tag = tag; this.sniffing = sniffing; - this.allocate = allocate; this.clientStats = clientStats; } getClientStats() { @@ -1248,7 +1225,6 @@ class Inbound extends XrayCommonClass { this.stream = new StreamSettings(); this.tag = ''; this.sniffing = new Sniffing(); - this.allocate = new Allocate(); } genVmessLink(address = '', port = this.port, forceTls, remark = '', clientId, security) { @@ -1703,7 +1679,6 @@ class Inbound extends XrayCommonClass { StreamSettings.fromJson(json.streamSettings), json.tag, Sniffing.fromJson(json.sniffing), - Allocate.fromJson(json.allocate), json.clientStats ) } @@ -1721,7 +1696,6 @@ class Inbound extends XrayCommonClass { streamSettings: streamSettings, tag: this.tag, sniffing: this.sniffing.toJson(), - allocate: this.allocate.toJson(), clientStats: this.clientStats }; } diff --git a/web/html/component/aClientTable.html b/web/html/component/aClientTable.html index 359e6e74..53ec27a3 100644 --- a/web/html/component/aClientTable.html +++ b/web/html/component/aClientTable.html @@ -98,6 +98,10 @@ + +