mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-30 00:49:34 +00:00
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:
@@ -1136,7 +1136,12 @@ export default function OutboundFormModal({
|
||||
path: ['/'],
|
||||
headers: {},
|
||||
},
|
||||
response: undefined,
|
||||
response: {
|
||||
version: '1.1',
|
||||
status: '200',
|
||||
reason: 'OK',
|
||||
headers: {},
|
||||
},
|
||||
}
|
||||
: { type: 'none' },
|
||||
)
|
||||
@@ -1145,12 +1150,24 @@ export default function OutboundFormModal({
|
||||
</Form.Item>
|
||||
{type === 'http' && (
|
||||
<>
|
||||
{/* Host is stored as a string[] on the
|
||||
wire (V2 header map: { Host: [...] }).
|
||||
The form-level normalize/getValueProps
|
||||
translate to/from a comma-joined input
|
||||
so the user types one Host:contentReference[oaicite:0]{index=0} value per
|
||||
server they want camouflaged. */}
|
||||
<Form.Item
|
||||
label="Request method"
|
||||
name={[
|
||||
'streamSettings', 'tcpSettings', 'header',
|
||||
'request', 'method',
|
||||
]}
|
||||
>
|
||||
<Input placeholder="GET" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="Request version"
|
||||
name={[
|
||||
'streamSettings', 'tcpSettings', 'header',
|
||||
'request', 'version',
|
||||
]}
|
||||
>
|
||||
<Input placeholder="1.1" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t('host')}
|
||||
name={[
|
||||
@@ -1192,6 +1209,52 @@ export default function OutboundFormModal({
|
||||
>
|
||||
<Input placeholder="/,/api,/static" />
|
||||
</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>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user