From 0c7b59ed47eaa2f786eedd584d9e4192964931f3 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 28 Aug 2025 10:15:04 +0200 Subject: removed: Allocate --- web/assets/js/model/inbound.js | 26 -------------------------- web/html/form/allocate.html | 15 --------------- web/html/form/inbound.html | 9 --------- web/html/inbounds.html | 3 --- web/service/inbound.go | 2 -- 5 files changed, 55 deletions(-) delete mode 100644 web/html/form/allocate.html (limited to 'web') 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/form/allocate.html b/web/html/form/allocate.html deleted file mode 100644 index aba8d5c9..00000000 --- a/web/html/form/allocate.html +++ /dev/null @@ -1,15 +0,0 @@ -{{define "form/allocate"}} - - - - [[ s ]] - - - - - - - - - -{{end}} diff --git a/web/html/form/inbound.html b/web/html/form/inbound.html index 021a51c7..9554d6aa 100644 --- a/web/html/form/inbound.html +++ b/web/html/form/inbound.html @@ -121,13 +121,4 @@ - - - {{end}} diff --git a/web/html/inbounds.html b/web/html/inbounds.html index 142a167c..b0d9828f 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -1093,7 +1093,6 @@ settings: Inbound.Settings.getSettings(baseInbound.protocol).toString(), streamSettings: baseInbound.stream.toString(), sniffing: baseInbound.sniffing.toString(), - allocate: baseInbound.allocate.toString(), }; await this.submit('/panel/inbound/add', data, inModal); }, @@ -1143,7 +1142,6 @@ data.streamSettings = JSON.stringify({ sockopt: inbound.stream.sockopt.toJson() }, null, 2); } data.sniffing = inbound.sniffing.toString(); - data.allocate = inbound.allocate.toString(); await this.submit('/panel/inbound/add', data, inModal); }, @@ -1167,7 +1165,6 @@ data.streamSettings = JSON.stringify({ sockopt: inbound.stream.sockopt.toJson() }, null, 2); } data.sniffing = inbound.sniffing.toString(); - data.allocate = inbound.allocate.toString(); await this.submit(`/panel/inbound/update/${dbInbound.id}`, data, inModal); }, diff --git a/web/service/inbound.go b/web/service/inbound.go index 78abef73..0621cdea 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -403,7 +403,6 @@ func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound, oldInbound.Settings = inbound.Settings oldInbound.StreamSettings = inbound.StreamSettings oldInbound.Sniffing = inbound.Sniffing - oldInbound.Allocate = inbound.Allocate if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" { oldInbound.Tag = fmt.Sprintf("inbound-%v", inbound.Port) } else { @@ -2037,7 +2036,6 @@ func (s *InboundService) MigrationRequirements() { tx.Rollback() } }() - // Calculate and backfill all_time from up+down for inbounds and clients err = tx.Exec(` -- cgit v1.2.3