diff --git a/frontend/src/pages/inbounds/InboundFormModal.new.tsx b/frontend/src/pages/inbounds/InboundFormModal.new.tsx index 1ff34ae5..49768a0c 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.new.tsx +++ b/frontend/src/pages/inbounds/InboundFormModal.new.tsx @@ -95,7 +95,7 @@ export default function InboundFormModalNew({ const [saving, setSaving] = useState(false); const selectableNodes = (availableNodes || []).filter((n) => n.enable); - const protocol = Form.useWatch('protocol', form) ?? ''; + const protocol = (Form.useWatch('protocol', form) ?? '') as string; const isNodeEligible = NODE_ELIGIBLE_PROTOCOLS.has(protocol); const sniffingEnabled = Form.useWatch(['sniffing', 'enabled'], form) ?? false; const vlessEncryption = Form.useWatch(['settings', 'encryption'], form) ?? ''; @@ -336,6 +336,93 @@ export default function InboundFormModalNew({ const protocolTab = ( <> + {protocol === Protocols.TUN && ( + <> + + + + + + + + {(fields, { add, remove }) => ( + + + {fields.map((field, j) => ( + + + + + + + ))} + + )} + + + {(fields, { add, remove }) => ( + + + {fields.map((field, j) => ( + + + + + + + ))} + + )} + + + + + + {(fields, { add, remove }) => ( + + Auto system routes + + } + > + + {fields.map((field, j) => ( + + + + + + + ))} + + )} + + + Auto outbounds interface + + } + > + + + + )} + {protocol === Protocols.TUNNEL && ( <> @@ -627,6 +714,7 @@ export default function InboundFormModalNew({ Protocols.HTTP, Protocols.MIXED, Protocols.TUNNEL, + Protocols.TUN, ] as string[]).includes(protocol) ? [{ key: 'protocol', label: t('pages.inbounds.protocol'), children: protocolTab }] : []),