From b60387accb884a6745b4c8ae89ef6e81baa68890 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Wed, 11 Dec 2024 17:05:47 +0100 Subject: [PATCH] XHTTP: Add "keepAlivePeriod" --- web/assets/js/model/inbound.js | 8 ++++++-- web/html/xui/form/stream/stream_ws.html | 2 +- web/html/xui/form/stream/stream_xhttp.html | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 06de3c0f..ae87604e 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -507,6 +507,7 @@ class xHTTPStreamSettings extends XrayCommonClass { }, mode = MODE_OPTION.AUTO, noGRPCHeader = false, + keepAlivePeriod = 45, ) { super(); this.path = path; @@ -520,6 +521,7 @@ class xHTTPStreamSettings extends XrayCommonClass { this.xmux = xmux; this.mode = mode; this.noGRPCHeader = noGRPCHeader; + this.keepAlivePeriod = keepAlivePeriod; } addHeader(name, value) { @@ -542,7 +544,8 @@ class xHTTPStreamSettings extends XrayCommonClass { json.xPaddingBytes, json.xmux, json.mode, - json.noGRPCHeader + json.noGRPCHeader, + json.keepAlivePeriod, ); } @@ -563,7 +566,8 @@ class xHTTPStreamSettings extends XrayCommonClass { cMaxLifetimeMs: this.xmux.cMaxLifetimeMs }, mode: this.mode, - noGRPCHeader: this.noGRPCHeader + noGRPCHeader: this.noGRPCHeader, + keepAlivePeriod: this.keepAlivePeriod, }; } } diff --git a/web/html/xui/form/stream/stream_ws.html b/web/html/xui/form/stream/stream_ws.html index 16a423ca..65c87ae1 100644 --- a/web/html/xui/form/stream/stream_ws.html +++ b/web/html/xui/form/stream/stream_ws.html @@ -13,7 +13,7 @@ - + diff --git a/web/html/xui/form/stream/stream_xhttp.html b/web/html/xui/form/stream/stream_xhttp.html index 621189a0..faec875d 100644 --- a/web/html/xui/form/stream/stream_xhttp.html +++ b/web/html/xui/form/stream/stream_xhttp.html @@ -17,8 +17,7 @@ - - + - @@ -28,6 +27,9 @@ [[ key ]] + + +