diff --git a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx index eafaa059..e67c07f2 100644 --- a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx +++ b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx @@ -46,13 +46,11 @@ import { antdRule } from '@/utils/zodForm'; import { ADDRESS_PORT_STRATEGY_OPTIONS, - ALPN_OPTIONS, FLOW_OPTIONS, HYSTERIA_NETWORK_OPTION, NETWORK_OPTIONS, PROTOCOL_OPTIONS, SERVER_PROTOCOLS, - UTLS_OPTIONS, } from './outbound-form-constants'; import { buildAddModeValues, @@ -82,6 +80,7 @@ import { WsForm, XhttpForm, } from './transport'; +import { RealityForm, TlsForm } from './security'; import './OutboundFormModal.css'; // Pattern A rewrite of OutboundFormModal. Built as a sibling `.new.tsx` @@ -603,91 +602,9 @@ export default function OutboundFormModal({ )} - {security === 'tls' && tlsAllowed && ( - <> - - - - - - - - - - - - - - - - - )} + {security === 'tls' && tlsAllowed && } - {security === 'reality' && realityAllowed && ( - <> - - - - - - - - - - - - - - - - - )} + {security === 'reality' && realityAllowed && } {((streamAllowed && network) || !streamAllowed) && ( diff --git a/frontend/src/pages/xray/outbounds/security/index.ts b/frontend/src/pages/xray/outbounds/security/index.ts new file mode 100644 index 00000000..f056fc2c --- /dev/null +++ b/frontend/src/pages/xray/outbounds/security/index.ts @@ -0,0 +1,2 @@ +export { default as TlsForm } from './tls'; +export { default as RealityForm } from './reality'; diff --git a/frontend/src/pages/xray/outbounds/security/reality.tsx b/frontend/src/pages/xray/outbounds/security/reality.tsx new file mode 100644 index 00000000..db0cd1f4 --- /dev/null +++ b/frontend/src/pages/xray/outbounds/security/reality.tsx @@ -0,0 +1,48 @@ +import { useTranslation } from 'react-i18next'; +import { Form, Input, Select } from 'antd'; + +import { UTLS_OPTIONS } from '../outbound-form-constants'; + +export default function RealityForm() { + const { t } = useTranslation(); + return ( + <> + + + + + + + + + + + + + + + + + ); +} diff --git a/frontend/src/pages/xray/outbounds/security/tls.tsx b/frontend/src/pages/xray/outbounds/security/tls.tsx new file mode 100644 index 00000000..e7cd1703 --- /dev/null +++ b/frontend/src/pages/xray/outbounds/security/tls.tsx @@ -0,0 +1,52 @@ +import { useTranslation } from 'react-i18next'; +import { Form, Input, Select } from 'antd'; + +import { ALPN_OPTIONS, UTLS_OPTIONS } from '../outbound-form-constants'; + +export default function TlsForm() { + const { t } = useTranslation(); + return ( + <> + + + + + + + + + + + + + + + + + ); +}