From a973fa6d6886b7f6af14d7848b31964c46ee151d Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 1 Feb 2026 02:58:18 +0100 Subject: [PATCH] XHTTP transport: New options for bypassing CDN's detection https://github.com/XTLS/Xray-core/pull/5414 --- web/assets/js/model/inbound.js | 52 ++++++++++ web/html/form/stream/stream_xhttp.html | 125 ++++++++++++++++++++++--- 2 files changed, 165 insertions(+), 12 deletions(-) diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index 6d65a11c..47f32f5c 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -487,6 +487,19 @@ class xHTTPStreamSettings extends XrayCommonClass { noSSEHeader = false, xPaddingBytes = "100-1000", mode = MODE_OPTION.AUTO, + xPaddingObfsMode = false, + xPaddingKey = '', + xPaddingHeader = '', + xPaddingPlacement = '', + xPaddingMethod = '', + uplinkHTTPMethod = '', + sessionPlacement = '', + sessionKey = '', + seqPlacement = '', + seqKey = '', + uplinkDataPlacement = '', + uplinkDataKey = '', + uplinkChunkSize = 0, ) { super(); this.path = path; @@ -498,6 +511,19 @@ class xHTTPStreamSettings extends XrayCommonClass { this.noSSEHeader = noSSEHeader; this.xPaddingBytes = xPaddingBytes; this.mode = mode; + this.xPaddingObfsMode = xPaddingObfsMode; + this.xPaddingKey = xPaddingKey; + this.xPaddingHeader = xPaddingHeader; + this.xPaddingPlacement = xPaddingPlacement; + this.xPaddingMethod = xPaddingMethod; + this.uplinkHTTPMethod = uplinkHTTPMethod; + this.sessionPlacement = sessionPlacement; + this.sessionKey = sessionKey; + this.seqPlacement = seqPlacement; + this.seqKey = seqKey; + this.uplinkDataPlacement = uplinkDataPlacement; + this.uplinkDataKey = uplinkDataKey; + this.uplinkChunkSize = uplinkChunkSize; } addHeader(name, value) { @@ -519,6 +545,19 @@ class xHTTPStreamSettings extends XrayCommonClass { json.noSSEHeader, json.xPaddingBytes, json.mode, + json.xPaddingObfsMode, + json.xPaddingKey, + json.xPaddingHeader, + json.xPaddingPlacement, + json.xPaddingMethod, + json.uplinkHTTPMethod, + json.sessionPlacement, + json.sessionKey, + json.seqPlacement, + json.seqKey, + json.uplinkDataPlacement, + json.uplinkDataKey, + json.uplinkChunkSize, ); } @@ -533,6 +572,19 @@ class xHTTPStreamSettings extends XrayCommonClass { noSSEHeader: this.noSSEHeader, xPaddingBytes: this.xPaddingBytes, mode: this.mode, + xPaddingObfsMode: this.xPaddingObfsMode, + xPaddingKey: this.xPaddingKey, + xPaddingHeader: this.xPaddingHeader, + xPaddingPlacement: this.xPaddingPlacement, + xPaddingMethod: this.xPaddingMethod, + uplinkHTTPMethod: this.uplinkHTTPMethod, + sessionPlacement: this.sessionPlacement, + sessionKey: this.sessionKey, + seqPlacement: this.seqPlacement, + seqKey: this.seqKey, + uplinkDataPlacement: this.uplinkDataPlacement, + uplinkDataKey: this.uplinkDataKey, + uplinkChunkSize: this.uplinkChunkSize, }; } } diff --git a/web/html/form/stream/stream_xhttp.html b/web/html/form/stream/stream_xhttp.html index 4b3052b6..447612c9 100644 --- a/web/html/form/stream/stream_xhttp.html +++ b/web/html/form/stream/stream_xhttp.html @@ -1,5 +1,6 @@ {{define "form/streamXHTTP"}} - + @@ -7,38 +8,138 @@ - + - + - + - + - [[ key ]] + [[ key + ]] - - + + - - + + - - + + + + + + + + + Default (POST) + POST + PUT + GET (packet-up only) + + + + + Default (path) + path + header + cookie + query + + + + + + + + Default (path) + path + header + cookie + query + + + + + + + + Default (body) + body + header + query + + + + + + + +