Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-08-28 11:15:04 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-08-28 11:15:04 +0300
commit0c7b59ed47eaa2f786eedd584d9e4192964931f3 (patch)
tree6729ad8502c390717cc0f86cf13dfc9ca3e6208b /web
parent3087c1b123f426b7c1306ab634fb84e7943e4217 (diff)
removed: Allocate
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/model/inbound.js26
-rw-r--r--web/html/form/allocate.html15
-rw-r--r--web/html/form/inbound.html9
-rw-r--r--web/html/inbounds.html3
-rw-r--r--web/service/inbound.go2
5 files changed, 0 insertions, 55 deletions
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"}}
-<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-form-item label='Strategy'>
- <a-select v-model="inbound.allocate.strategy" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="s in ['always','random']" :value="s">[[ s ]]</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label='Refresh'>
- <a-input-number v-model.number="inbound.allocate.refresh" min="0"></a-input-number>
- </a-form-item>
- <a-form-item label='Concurrency'>
- <a-input-number v-model.number="inbound.allocate.concurrency" min="0"></a-input-number>
- </a-form-item>
-</a-form>
-{{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 @@
</a-collapse-panel>
</a-collapse>
-<!-- allocate -->
-<!-- Temporarily disabled until we accepts range for port allocation
-<a-collapse>
- <a-collapse-panel header='Allocate'>
- {{template "form/allocate"}}
- </a-collapse-panel>
-</a-collapse>
--->
-
{{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(`