feat(frontend): outbound TCP HTTP camouflage parity with inbound

Add method/version inputs, request header map, and full response
sub-section (version/status/reason/headers) to OutboundFormModal so the
outbound side can configure the same HTTP-1.1 obfuscation knobs the
inbound side already exposed.
This commit is contained in:
MHSanaei 2026-05-26 14:12:29 +02:00
parent a7166988ca
commit 9f84859ff6
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A

View file

@ -1136,7 +1136,12 @@ export default function OutboundFormModal({
path: ['/'], path: ['/'],
headers: {}, headers: {},
}, },
response: undefined, response: {
version: '1.1',
status: '200',
reason: 'OK',
headers: {},
},
} }
: { type: 'none' }, : { type: 'none' },
) )
@ -1145,12 +1150,24 @@ export default function OutboundFormModal({
</Form.Item> </Form.Item>
{type === 'http' && ( {type === 'http' && (
<> <>
{/* Host is stored as a string[] on the <Form.Item
wire (V2 header map: { Host: [...] }). label="Request method"
The form-level normalize/getValueProps name={[
translate to/from a comma-joined input 'streamSettings', 'tcpSettings', 'header',
so the user types one Host:contentReference[oaicite:0]{index=0} value per 'request', 'method',
server they want camouflaged. */} ]}
>
<Input placeholder="GET" />
</Form.Item>
<Form.Item
label="Request version"
name={[
'streamSettings', 'tcpSettings', 'header',
'request', 'version',
]}
>
<Input placeholder="1.1" />
</Form.Item>
<Form.Item <Form.Item
label={t('host')} label={t('host')}
name={[ name={[
@ -1192,6 +1209,52 @@ export default function OutboundFormModal({
> >
<Input placeholder="/,/api,/static" /> <Input placeholder="/,/api,/static" />
</Form.Item> </Form.Item>
<Form.Item
label="Request headers"
name={[
'streamSettings', 'tcpSettings', 'header',
'request', 'headers',
]}
>
<HeaderMapEditor mode="v2" />
</Form.Item>
<Form.Item
label="Response version"
name={[
'streamSettings', 'tcpSettings', 'header',
'response', 'version',
]}
>
<Input placeholder="1.1" />
</Form.Item>
<Form.Item
label="Response status"
name={[
'streamSettings', 'tcpSettings', 'header',
'response', 'status',
]}
>
<Input placeholder="200" />
</Form.Item>
<Form.Item
label="Response reason"
name={[
'streamSettings', 'tcpSettings', 'header',
'response', 'reason',
]}
>
<Input placeholder="OK" />
</Form.Item>
<Form.Item
label="Response headers"
name={[
'streamSettings', 'tcpSettings', 'header',
'response', 'headers',
]}
>
<HeaderMapEditor mode="v2" />
</Form.Item>
</> </>
)} )}
</> </>