From 01991e74b14feba9588e86359b98a4c1cc2902d6 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 26 May 2026 13:21:16 +0200 Subject: [PATCH] feat(frontend): inbound TCP HTTP camouflage response fields + request headers Complete the TCP HTTP camouflage UI on the inbound side. Already there from the previous symmetric host/path commit: - Request host (string[] via comma-string) - Request path (string[] via comma-string) This commit adds: - Request headers (V2 map: name -> string[]) via HeaderMapEditor. - Response version (defaults to '1.1' when camouflage toggles on). - Response status (defaults to '200'). - Response reason (defaults to 'OK'). - Response headers (V2 map) via HeaderMapEditor. The HTTP camouflage Switch seeds both request and response sub-objects on toggle-on so xray-core sees a valid TcpHeader.http shape from the first save. Without the response seed, partial fills would emit a schema-incomplete response block that xray-core might reject. --- .../src/pages/inbounds/InboundFormModal.tsx | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/frontend/src/pages/inbounds/InboundFormModal.tsx b/frontend/src/pages/inbounds/InboundFormModal.tsx index 8cb8978a..dfc204f1 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.tsx +++ b/frontend/src/pages/inbounds/InboundFormModal.tsx @@ -1234,6 +1234,12 @@ export default function InboundFormModal({ path: ['/'], headers: {}, }, + response: { + version: '1.1', + status: '200', + reason: 'OK', + headers: {}, + }, } : { type: 'none' }, ); @@ -1295,6 +1301,56 @@ export default function InboundFormModal({ > + + + + + {/* Response side: shaped as a separate sub-object on the + wire ({version, status, reason, headers}). Inbound is + the server, so the response side is the one the panel + sends back to clients during HTTP camouflage. */} + + + + + + + + + + + + ); }}