|
@@ -1197,6 +1197,27 @@ 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 {
|
|
class Inbound extends XrayCommonClass {
|
|
constructor(
|
|
constructor(
|
|
port = RandomUtil.randomIntRange(10000, 60000),
|
|
port = RandomUtil.randomIntRange(10000, 60000),
|
|
@@ -1206,6 +1227,7 @@ class Inbound extends XrayCommonClass {
|
|
streamSettings = new StreamSettings(),
|
|
streamSettings = new StreamSettings(),
|
|
tag = '',
|
|
tag = '',
|
|
sniffing = new Sniffing(),
|
|
sniffing = new Sniffing(),
|
|
|
|
+ allocate = new Allocate(),
|
|
clientStats = '',
|
|
clientStats = '',
|
|
) {
|
|
) {
|
|
super();
|
|
super();
|
|
@@ -1216,6 +1238,7 @@ class Inbound extends XrayCommonClass {
|
|
this.stream = streamSettings;
|
|
this.stream = streamSettings;
|
|
this.tag = tag;
|
|
this.tag = tag;
|
|
this.sniffing = sniffing;
|
|
this.sniffing = sniffing;
|
|
|
|
+ this.allocate = allocate;
|
|
this.clientStats = clientStats;
|
|
this.clientStats = clientStats;
|
|
}
|
|
}
|
|
getClientStats() {
|
|
getClientStats() {
|
|
@@ -1406,6 +1429,7 @@ class Inbound extends XrayCommonClass {
|
|
this.stream = new StreamSettings();
|
|
this.stream = new StreamSettings();
|
|
this.tag = '';
|
|
this.tag = '';
|
|
this.sniffing = new Sniffing();
|
|
this.sniffing = new Sniffing();
|
|
|
|
+ this.allocate = new Allocate();
|
|
}
|
|
}
|
|
|
|
|
|
genVmessLink(address = '', port = this.port, forceTls, remark = '', clientId, security) {
|
|
genVmessLink(address = '', port = this.port, forceTls, remark = '', clientId, security) {
|
|
@@ -1885,6 +1909,7 @@ class Inbound extends XrayCommonClass {
|
|
StreamSettings.fromJson(json.streamSettings),
|
|
StreamSettings.fromJson(json.streamSettings),
|
|
json.tag,
|
|
json.tag,
|
|
Sniffing.fromJson(json.sniffing),
|
|
Sniffing.fromJson(json.sniffing),
|
|
|
|
+ Allocate.fromJson(json.allocate),
|
|
json.clientStats
|
|
json.clientStats
|
|
)
|
|
)
|
|
}
|
|
}
|
|
@@ -1902,6 +1927,7 @@ class Inbound extends XrayCommonClass {
|
|
streamSettings: streamSettings,
|
|
streamSettings: streamSettings,
|
|
tag: this.tag,
|
|
tag: this.tag,
|
|
sniffing: this.sniffing.toJson(),
|
|
sniffing: this.sniffing.toJson(),
|
|
|
|
+ allocate: this.allocate.toJson(),
|
|
clientStats: this.clientStats
|
|
clientStats: this.clientStats
|
|
};
|
|
};
|
|
}
|
|
}
|