Преглед на файлове

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.
MHSanaei преди 11 часа
родител
ревизия
a7166988ca
променени са 1 файла, в които са добавени 28 реда и са изтрити 0 реда
  1. 28 0
      frontend/src/pages/xray/OutboundFormModal.tsx

+ 28 - 0
frontend/src/pages/xray/OutboundFormModal.tsx

@@ -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>
                                 </>
                               )}
                             </>