mirror of
https://github.com/alireza0/x-ui.git
synced 2026-08-27 03:43:28 +00:00
update splithttp
Co-Authored-By: mhsanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
parent
91d107c5ae
commit
a84c055fd8
2 changed files with 39 additions and 12 deletions
|
|
@ -477,13 +477,25 @@ class HttpUpgradeStreamSettings extends XrayCommonClass {
|
|||
}
|
||||
}
|
||||
class SplitHTTPStreamSettings extends XrayCommonClass {
|
||||
constructor(path='/', host='', headers=[] , maxUploadSize= 1000000, maxConcurrentUploads= 10) {
|
||||
constructor(
|
||||
path = '/',
|
||||
host = '',
|
||||
headers = [],
|
||||
scMaxConcurrentPosts = "100-200",
|
||||
scMaxEachPostBytes = "1000000-2000000",
|
||||
scMinPostsIntervalMs = "10-50",
|
||||
noSSEHeader = false,
|
||||
xPaddingBytes = "100-1000",
|
||||
) {
|
||||
super();
|
||||
this.path = path;
|
||||
this.host = host;
|
||||
this.headers = headers;
|
||||
this.maxUploadSize = maxUploadSize;
|
||||
this.maxConcurrentUploads = maxConcurrentUploads;
|
||||
this.scMaxConcurrentPosts = scMaxConcurrentPosts;
|
||||
this.scMaxEachPostBytes = scMaxEachPostBytes;
|
||||
this.scMinPostsIntervalMs = scMinPostsIntervalMs;
|
||||
this.noSSEHeader = noSSEHeader;
|
||||
this.xPaddingBytes = xPaddingBytes;
|
||||
}
|
||||
|
||||
addHeader(name, value) {
|
||||
|
|
@ -494,13 +506,16 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
|
|||
this.headers.splice(index, 1);
|
||||
}
|
||||
|
||||
static fromJson(json={}) {
|
||||
static fromJson(json = {}) {
|
||||
return new SplitHTTPStreamSettings(
|
||||
json.path,
|
||||
json.host,
|
||||
XrayCommonClass.toHeaders(json.headers),
|
||||
json.maxUploadSize,
|
||||
json.maxConcurrentUploads,
|
||||
json.scMaxConcurrentPosts,
|
||||
json.scMaxEachPostBytes,
|
||||
json.scMinPostsIntervalMs,
|
||||
json.noSSEHeader,
|
||||
json.xPaddingBytes,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -509,8 +524,11 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
|
|||
path: this.path,
|
||||
host: this.host,
|
||||
headers: XrayCommonClass.toV2Headers(this.headers, false),
|
||||
maxUploadSize: this.maxUploadSize,
|
||||
maxConcurrentUploads: this.maxConcurrentUploads,
|
||||
scMaxConcurrentPosts: this.scMaxConcurrentPosts,
|
||||
scMaxEachPostBytes: this.scMaxEachPostBytes,
|
||||
scMinPostsIntervalMs: this.scMinPostsIntervalMs,
|
||||
noSSEHeader: this.noSSEHeader,
|
||||
xPaddingBytes: this.xPaddingBytes,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,20 @@
|
|||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Upload Size (byte)">
|
||||
<a-input-number v-model="inbound.stream.splithttp.maxUploadSize" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Concurrent Upload">
|
||||
<a-input-number v-model="inbound.stream.splithttp.maxConcurrentUploads" :min="0"></a-input-number>
|
||||
<a-input v-model.trim="inbound.stream.splithttp.scMaxConcurrentPosts"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Upload Size (Byte)">
|
||||
<a-input v-model.trim="inbound.stream.splithttp.scMaxEachPostBytes"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Min Upload Interval (Ms)">
|
||||
<a-input v-model.trim="inbound.stream.splithttp.scMinPostsIntervalMs"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Bytes">
|
||||
<a-input v-model.trim="inbound.stream.splithttp.xPaddingBytes"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="No SSE Header">
|
||||
<a-switch v-model="inbound.stream.splithttp.noSSEHeader"></a-switch>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue