Skip to content

Commit

Permalink
new - splithttp (scMinPostsIntervalMs)
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Jul 29, 2024
1 parent bae8927 commit 4ec104c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
17 changes: 10 additions & 7 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,14 @@ class HTTPUpgradeStreamSettings extends XrayCommonClass {
}

class SplitHTTPStreamSettings extends XrayCommonClass {
constructor(path='/', host='', headers=[] , maxUploadSize= 1000000, maxConcurrentUploads= 10) {
constructor(path='/', host='', headers=[] , scMaxConcurrentPosts= 100, scMaxEachPostBytes= 1000000, scMinPostsIntervalMs= 30) {
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;
}

addHeader(name, value) {
Expand All @@ -545,8 +546,9 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
json.path,
json.host,
XrayCommonClass.toHeaders(json.headers),
json.maxUploadSize,
json.maxConcurrentUploads,
json.scMaxConcurrentPosts,
json.scMaxEachPostBytes,
json.scMinPostsIntervalMs,
);
}

Expand All @@ -555,8 +557,9 @@ 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,
};
}
}
Expand Down
9 changes: 6 additions & 3 deletions web/html/xui/form/stream/stream_splithttp.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
</a-input>
</a-input-group>
</a-form-item>
<a-form-item label="Max Concurrent Upload">
<a-input-number v-model="inbound.stream.splithttp.scMaxConcurrentPosts" :min="0"></a-input-number>
</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-input-number v-model="inbound.stream.splithttp.scMaxEachPostBytes" :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-form-item label="Min Upload Interval Ms">
<a-input-number v-model="inbound.stream.splithttp.scMinPostsIntervalMs" :min="0"></a-input-number>
</a-form-item>
</a-form>
{{end}}

0 comments on commit 4ec104c

Please sign in to comment.