Skip to content

Commit

Permalink
new - splithttp (noSSEHeader)
Browse files Browse the repository at this point in the history
  • Loading branch information
qist committed Jul 29, 2024
1 parent 6cb6644 commit 1bdd681
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.26
1.8.27
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.24.5
github.com/xtls/xray-core v1.8.21
github.com/xtls/xray-core v1.8.23
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.25.0
golang.org/x/text v0.16.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ github.com/xtls/xray-core v1.8.19 h1:mml7smcO2FM5HyyKdqnf5F2BUvi3br2ldrqmeemEFRE
github.com/xtls/xray-core v1.8.19/go.mod h1:0CwyMPNA5Cs+ukPXHbYQGgne/ug0PuXOSVqBu7zyXOc=
github.com/xtls/xray-core v1.8.21 h1:cNdepud+R9PENKzXlSZsq0je4BWI6liXAuep6CD6xvk=
github.com/xtls/xray-core v1.8.21/go.mod h1:0CwyMPNA5Cs+ukPXHbYQGgne/ug0PuXOSVqBu7zyXOc=
github.com/xtls/xray-core v1.8.23 h1:A8Wr50ildMYLpaNu3EiK+Stg/tps6i0h7z5Hr4f9H2k=
github.com/xtls/xray-core v1.8.23/go.mod h1:0CwyMPNA5Cs+ukPXHbYQGgne/ug0PuXOSVqBu7zyXOc=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
Expand Down
20 changes: 13 additions & 7 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,13 +544,15 @@ class HttpUpgradeStreamSettings extends XrayCommonClass {
}

class SplitHTTPStreamSettings extends XrayCommonClass {
constructor(path = '/', host = '', headers = [], maxUploadSize = 1000000, maxConcurrentUploads = 10) {
constructor(path = '/', host = '', headers = [], scMaxEachPostBytes = 1000000, scMaxConcurrentPosts = 100, scMinPostsIntervalMs=30, noSSEHeader=false) {
super();
this.path = path;
this.host = host;
this.headers = headers;
this.maxUploadSize = maxUploadSize;
this.maxConcurrentUploads = maxConcurrentUploads;
this.scMaxEachPostBytes = scMaxEachPostBytes;
this.scMaxConcurrentPosts = scMaxConcurrentPosts;
this.scMinPostsIntervalMs = scMinPostsIntervalMs;
this.noSSEHeader = noSSEHeader;
}

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

Expand All @@ -583,8 +587,10 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
path: this.path,
host: this.host,
headers: XrayCommonClass.toV2Headers(this.headers, false),
maxUploadSize: this.maxUploadSize,
maxConcurrentUploads: this.maxConcurrentUploads,
scMaxEachPostBytes: this.scMaxEachPostBytes,
scMaxConcurrentPosts: this.scMaxConcurrentPosts,
scMinPostsIntervalMs: this.scMinPostsIntervalMs,
noSSEHeader: this.noSSEHeader,
};
}
}
Expand Down
14 changes: 10 additions & 4 deletions web/html/xui/form/stream/stream_splithttp.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@
</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="Min Upload Interval (Ms)">
<a-input-number v-model="inbound.stream.splithttp.scMinPostsIntervalMs" :min="0"></a-input-number>
</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-item label="Max Concurrent Upload">
<a-input-number v-model="inbound.stream.splithttp.maxConcurrentUploads" :min="0"></a-input-number>
</a-form-item>
</a-form>
{{end}}

0 comments on commit 1bdd681

Please sign in to comment.