Pārlūkot izejas kodu

feat(frontend): stream tab WS + gRPC + HTTPUpgrade sections (Pattern A)

Adds the three medium-complexity network branches to the stream tab.
Plain Form.Item paths into the corresponding *Settings keys — no
Form.List wrappers since these schemas don't have arrays at the top
level.

WS: acceptProxyProtocol, host, path, heartbeatPeriod
gRPC: serviceName, authority, multiMode
HTTPUpgrade: acceptProxyProtocol, host, path

Header editing is deferred to a later commit — WsHeaderMap is a
Record<string,string> on the wire, V2HeaderMap a Record<string,string[]>,
and the form needs an array-of-{name,value} UI that converts on edit.
Worth building once and reusing across WS, HTTPUpgrade, XHTTP, TCP
request/response, and Hysteria masquerade headers.

XHTTP + external-proxy + sockopt + hysteria stream + finalmask hookup
still pending.
MHSanaei 22 stundas atpakaļ
vecāks
revīzija
72c717bffd
1 mainītis faili ar 72 papildinājumiem un 0 dzēšanām
  1. 72 0
      frontend/src/pages/inbounds/InboundFormModal.new.tsx

+ 72 - 0
frontend/src/pages/inbounds/InboundFormModal.new.tsx

@@ -818,6 +818,78 @@ export default function InboundFormModalNew({
         </>
       )}
 
+      {network === 'ws' && (
+        <>
+          <Form.Item
+            name={['streamSettings', 'wsSettings', 'acceptProxyProtocol']}
+            label="Proxy Protocol"
+            valuePropName="checked"
+          >
+            <Switch />
+          </Form.Item>
+          <Form.Item name={['streamSettings', 'wsSettings', 'host']} label={t('host')}>
+            <Input />
+          </Form.Item>
+          <Form.Item name={['streamSettings', 'wsSettings', 'path']} label={t('path')}>
+            <Input />
+          </Form.Item>
+          <Form.Item
+            name={['streamSettings', 'wsSettings', 'heartbeatPeriod']}
+            label="Heartbeat Period"
+          >
+            <InputNumber min={0} />
+          </Form.Item>
+        </>
+      )}
+
+      {network === 'grpc' && (
+        <>
+          <Form.Item
+            name={['streamSettings', 'grpcSettings', 'serviceName']}
+            label="Service Name"
+          >
+            <Input />
+          </Form.Item>
+          <Form.Item
+            name={['streamSettings', 'grpcSettings', 'authority']}
+            label="Authority"
+          >
+            <Input />
+          </Form.Item>
+          <Form.Item
+            name={['streamSettings', 'grpcSettings', 'multiMode']}
+            label="Multi Mode"
+            valuePropName="checked"
+          >
+            <Switch />
+          </Form.Item>
+        </>
+      )}
+
+      {network === 'httpupgrade' && (
+        <>
+          <Form.Item
+            name={['streamSettings', 'httpupgradeSettings', 'acceptProxyProtocol']}
+            label="Proxy Protocol"
+            valuePropName="checked"
+          >
+            <Switch />
+          </Form.Item>
+          <Form.Item
+            name={['streamSettings', 'httpupgradeSettings', 'host']}
+            label={t('host')}
+          >
+            <Input />
+          </Form.Item>
+          <Form.Item
+            name={['streamSettings', 'httpupgradeSettings', 'path']}
+            label={t('path')}
+          >
+            <Input />
+          </Form.Item>
+        </>
+      )}
+
       {network === 'kcp' && (
         <>
           <Form.Item name={['streamSettings', 'kcpSettings', 'mtu']} label="MTU">