diff --git a/frontend/src/pages/inbounds/InboundFormModal.new.tsx b/frontend/src/pages/inbounds/InboundFormModal.new.tsx index 9bae57f7..fee7c51e 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.new.tsx +++ b/frontend/src/pages/inbounds/InboundFormModal.new.tsx @@ -8,6 +8,7 @@ import { Input, InputNumber, Modal, + Radio, Select, Space, Switch, @@ -46,6 +47,7 @@ import { TCP_CONGESTION_OPTION, TLS_CIPHER_OPTION, TLS_VERSION_OPTION, + USAGE_OPTION, UTLS_FINGERPRINT, } from '@/schemas/primitives'; import { SockoptStreamSettingsSchema } from '@/schemas/protocols/stream/sockopt'; @@ -53,6 +55,8 @@ import { TlsStreamSettingsSchema } from '@/schemas/protocols/security/tls'; import { RealityStreamSettingsSchema } from '@/schemas/protocols/security/reality'; import DateTimePicker from '@/components/DateTimePicker'; import InputAddon from '@/components/InputAddon'; + +const { TextArea } = Input; import type { DBInbound } from '@/models/dbinbound'; import type { NodeRecord } from '@/api/queries/useNodesQuery'; @@ -1556,6 +1560,157 @@ export default function InboundFormModalNew({ + + {(certFields, { add, remove }) => ( + <> + + + + {certFields.map((certField, idx) => ( +
+ + + + {t('pages.inbounds.certificatePath')} + + + {t('pages.inbounds.certificateContent')} + + + + {certFields.length > 1 && ( + + + + )} + + prev.streamSettings?.tlsSettings?.certificates?.[certField.name]?.useFile + !== curr.streamSettings?.tlsSettings?.certificates?.[certField.name]?.useFile + } + > + {({ getFieldValue }) => { + const useFile = getFieldValue([ + 'streamSettings', 'tlsSettings', 'certificates', + certField.name, 'useFile', + ]); + return useFile ? ( + <> + + + + + + + + ) : ( + <> + typeof v === 'string' + ? v.split('\n') + : v} + getValueProps={(v) => ({ + value: Array.isArray(v) ? v.join('\n') : v, + })} + > +