Skip to content

Commit

Permalink
XHTTP: Add "hMaxRequestTimes, hKeepAlivePeriod"
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Dec 16, 2024
1 parent 88a17cd commit 918a2b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
14 changes: 7 additions & 7 deletions web/assets/js/model/inbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,12 @@ class xHTTPStreamSettings extends XrayCommonClass {
maxConcurrency: "16-32",
maxConnections: 0,
cMaxReuseTimes: "64-128",
cMaxLifetimeMs: 0
cMaxLifetimeMs: 0,
hMaxRequestTimes: "800-900",
hKeepAlivePeriod: 0,
},
mode = MODE_OPTION.AUTO,
noGRPCHeader = false,
keepAlivePeriod = 45,
noGRPCHeader = false
) {
super();
this.path = path;
Expand All @@ -521,7 +522,6 @@ class xHTTPStreamSettings extends XrayCommonClass {
this.xmux = xmux;
this.mode = mode;
this.noGRPCHeader = noGRPCHeader;
this.keepAlivePeriod = keepAlivePeriod;
}

addHeader(name, value) {
Expand All @@ -545,7 +545,6 @@ class xHTTPStreamSettings extends XrayCommonClass {
json.xmux,
json.mode,
json.noGRPCHeader,
json.keepAlivePeriod,
);
}

Expand All @@ -563,11 +562,12 @@ class xHTTPStreamSettings extends XrayCommonClass {
maxConcurrency: this.xmux.maxConcurrency,
maxConnections: this.xmux.maxConnections,
cMaxReuseTimes: this.xmux.cMaxReuseTimes,
cMaxLifetimeMs: this.xmux.cMaxLifetimeMs
cMaxLifetimeMs: this.xmux.cMaxLifetimeMs,
hMaxRequestTimes: this.xmux.hMaxRequestTimes,
hKeepAlivePeriod: this.xmux.hKeepAlivePeriod,
},
mode: this.mode,
noGRPCHeader: this.noGRPCHeader,
keepAlivePeriod: this.keepAlivePeriod,
};
}
}
Expand Down
9 changes: 6 additions & 3 deletions web/html/xui/form/stream/stream_xhttp.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
<a-select-option v-for="key in MODE_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item label='keep-Alive Period'>
<a-input-number v-model.number="inbound.stream.xhttp.keepAlivePeriod"></a-input-number>
</a-form-item>
<a-form-item label="Max Concurrent Upload">
<a-input v-model.trim="inbound.stream.xhttp.scMaxConcurrentPosts"></a-input>
</a-form-item>
Expand Down Expand Up @@ -57,6 +54,12 @@
<a-form-item label="Max Lifetime (ms)">
<a-input v-model="inbound.stream.xhttp.xmux.cMaxLifetimeMs"></a-input>
</a-form-item>
<a-form-item label="Max Request Times">
<a-input v-model="inbound.stream.xhttp.xmux.hMaxRequestTimes"></a-input>
</a-form-item>
<a-form-item label='Keep Alive Period'>
<a-input v-model.number="inbound.stream.xhttp.xmux.hKeepAlivePeriod"></a-input>
</a-form-item>
<a-form-item label="No gRPC Header">
<a-switch v-model="inbound.stream.xhttp.noGRPCHeader"></a-switch>
</a-form-item>
Expand Down

0 comments on commit 918a2b1

Please sign in to comment.