Skip to content

Commit 918a2b1

Browse files
committed
XHTTP: Add "hMaxRequestTimes, hKeepAlivePeriod"
1 parent 88a17cd commit 918a2b1

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

web/assets/js/model/inbound.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,12 @@ class xHTTPStreamSettings extends XrayCommonClass {
503503
maxConcurrency: "16-32",
504504
maxConnections: 0,
505505
cMaxReuseTimes: "64-128",
506-
cMaxLifetimeMs: 0
506+
cMaxLifetimeMs: 0,
507+
hMaxRequestTimes: "800-900",
508+
hKeepAlivePeriod: 0,
507509
},
508510
mode = MODE_OPTION.AUTO,
509-
noGRPCHeader = false,
510-
keepAlivePeriod = 45,
511+
noGRPCHeader = false
511512
) {
512513
super();
513514
this.path = path;
@@ -521,7 +522,6 @@ class xHTTPStreamSettings extends XrayCommonClass {
521522
this.xmux = xmux;
522523
this.mode = mode;
523524
this.noGRPCHeader = noGRPCHeader;
524-
this.keepAlivePeriod = keepAlivePeriod;
525525
}
526526

527527
addHeader(name, value) {
@@ -545,7 +545,6 @@ class xHTTPStreamSettings extends XrayCommonClass {
545545
json.xmux,
546546
json.mode,
547547
json.noGRPCHeader,
548-
json.keepAlivePeriod,
549548
);
550549
}
551550

@@ -563,11 +562,12 @@ class xHTTPStreamSettings extends XrayCommonClass {
563562
maxConcurrency: this.xmux.maxConcurrency,
564563
maxConnections: this.xmux.maxConnections,
565564
cMaxReuseTimes: this.xmux.cMaxReuseTimes,
566-
cMaxLifetimeMs: this.xmux.cMaxLifetimeMs
565+
cMaxLifetimeMs: this.xmux.cMaxLifetimeMs,
566+
hMaxRequestTimes: this.xmux.hMaxRequestTimes,
567+
hKeepAlivePeriod: this.xmux.hKeepAlivePeriod,
567568
},
568569
mode: this.mode,
569570
noGRPCHeader: this.noGRPCHeader,
570-
keepAlivePeriod: this.keepAlivePeriod,
571571
};
572572
}
573573
}

web/html/xui/form/stream/stream_xhttp.html

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
<a-select-option v-for="key in MODE_OPTION" :value="key">[[ key ]]</a-select-option>
2828
</a-select>
2929
</a-form-item>
30-
<a-form-item label='keep-Alive Period'>
31-
<a-input-number v-model.number="inbound.stream.xhttp.keepAlivePeriod"></a-input-number>
32-
</a-form-item>
3330
<a-form-item label="Max Concurrent Upload">
3431
<a-input v-model.trim="inbound.stream.xhttp.scMaxConcurrentPosts"></a-input>
3532
</a-form-item>
@@ -57,6 +54,12 @@
5754
<a-form-item label="Max Lifetime (ms)">
5855
<a-input v-model="inbound.stream.xhttp.xmux.cMaxLifetimeMs"></a-input>
5956
</a-form-item>
57+
<a-form-item label="Max Request Times">
58+
<a-input v-model="inbound.stream.xhttp.xmux.hMaxRequestTimes"></a-input>
59+
</a-form-item>
60+
<a-form-item label='Keep Alive Period'>
61+
<a-input v-model.number="inbound.stream.xhttp.xmux.hKeepAlivePeriod"></a-input>
62+
</a-form-item>
6063
<a-form-item label="No gRPC Header">
6164
<a-switch v-model="inbound.stream.xhttp.noGRPCHeader"></a-switch>
6265
</a-form-item>

0 commit comments

Comments
 (0)