feat(frontend): complete outbound sockopt section with remaining knobs

Add the four remaining SockoptStreamSettings fields that were
edit-via-JSON-only after the initial outbound modal rewrite:

- TCP keep-alive idle (s) — tcpKeepAliveIdle, time before sending
  the first probe on an idle TCP connection.
- TCP max segment — tcpMaxSeg, override the default MSS.
- TCP window clamp — tcpWindowClamp, cap the TCP receive window.
- Trusted X-Forwarded-For — trustedXForwardedFor, list of trusted
  proxy hostnames/CIDRs whose XFF headers Xray will honor.

The outbound sockopt section now exposes all 17 SockoptStreamSettings
fields from the schema. The InboundFormModal's sockopt section has
its own field list (closer to the legacy class) and is unchanged.
This commit is contained in:
MHSanaei
2026-05-26 13:47:09 +02:00
parent 5c902ca298
commit a7166988ca

View File

@@ -2041,6 +2041,34 @@ export default function OutboundFormModal({
>
<InputNumber min={0} style={{ width: '100%' }} />
</Form.Item>
<Form.Item
label="TCP keep-alive idle (s)"
name={['streamSettings', 'sockopt', 'tcpKeepAliveIdle']}
>
<InputNumber min={0} style={{ width: '100%' }} />
</Form.Item>
<Form.Item
label="TCP max segment"
name={['streamSettings', 'sockopt', 'tcpMaxSeg']}
>
<InputNumber min={0} style={{ width: '100%' }} />
</Form.Item>
<Form.Item
label="TCP window clamp"
name={['streamSettings', 'sockopt', 'tcpWindowClamp']}
>
<InputNumber min={0} style={{ width: '100%' }} />
</Form.Item>
<Form.Item
label="Trusted X-Forwarded-For"
name={['streamSettings', 'sockopt', 'trustedXForwardedFor']}
>
<Select
mode="tags"
tokenSeparators={[',', ' ']}
placeholder="trusted-proxy.example,10.0.0.0/8"
/>
</Form.Item>
</>
)}
</>