|
@@ -17,6 +17,7 @@ import type { HostRecord } from '@/api/queries/useHostsQuery';
|
|
|
import { BulkAddHostSchema, type BulkAddHostValues } from '@/schemas/api/host';
|
|
import { BulkAddHostSchema, type BulkAddHostValues } from '@/schemas/api/host';
|
|
|
import type { InboundOption } from '@/schemas/client';
|
|
import type { InboundOption } from '@/schemas/client';
|
|
|
import { ALPN_OPTION, UTLS_FINGERPRINT } from '@/schemas/primitives';
|
|
import { ALPN_OPTION, UTLS_FINGERPRINT } from '@/schemas/primitives';
|
|
|
|
|
+import { CipherSuitesSelect } from '@/components/form';
|
|
|
import { FormField, rhfZodValidate } from '@/components/form/rhf';
|
|
import { FormField, rhfZodValidate } from '@/components/form/rhf';
|
|
|
import { useNodesQuery } from '@/api/queries/useNodesQuery';
|
|
import { useNodesQuery } from '@/api/queries/useNodesQuery';
|
|
|
import { useMediaQuery } from '@/hooks/useMediaQuery';
|
|
import { useMediaQuery } from '@/hooks/useMediaQuery';
|
|
@@ -56,6 +57,7 @@ function defaultsFor(host: HostRecord | null): FormShape {
|
|
|
path: host?.path ?? '',
|
|
path: host?.path ?? '',
|
|
|
alpn: (host?.alpn as BulkAddHostValues['alpn']) ?? [],
|
|
alpn: (host?.alpn as BulkAddHostValues['alpn']) ?? [],
|
|
|
fingerprint: host?.fingerprint as BulkAddHostValues['fingerprint'],
|
|
fingerprint: host?.fingerprint as BulkAddHostValues['fingerprint'],
|
|
|
|
|
+ cipherSuites: host?.cipherSuites ?? '',
|
|
|
overrideSniFromAddress: host?.overrideSniFromAddress ?? false,
|
|
overrideSniFromAddress: host?.overrideSniFromAddress ?? false,
|
|
|
keepSniBlank: host?.keepSniBlank ?? false,
|
|
keepSniBlank: host?.keepSniBlank ?? false,
|
|
|
pinnedPeerCertSha256: host?.pinnedPeerCertSha256 ?? [],
|
|
pinnedPeerCertSha256: host?.pinnedPeerCertSha256 ?? [],
|
|
@@ -332,6 +334,12 @@ export default function HostFormModal({
|
|
|
<FormField name="alpn" label={t('pages.hosts.fields.alpn')}>
|
|
<FormField name="alpn" label={t('pages.hosts.fields.alpn')}>
|
|
|
<Select mode="multiple" allowClear options={alpnOptions} />
|
|
<Select mode="multiple" allowClear options={alpnOptions} />
|
|
|
</FormField>
|
|
</FormField>
|
|
|
|
|
+ <FormField
|
|
|
|
|
+ name="cipherSuites"
|
|
|
|
|
+ label={t('pages.inbounds.form.cipherSuites')}
|
|
|
|
|
+ >
|
|
|
|
|
+ <CipherSuitesSelect />
|
|
|
|
|
+ </FormField>
|
|
|
<FormField name="pinnedPeerCertSha256" label={t('pages.hosts.fields.pins')}>
|
|
<FormField name="pinnedPeerCertSha256" label={t('pages.hosts.fields.pins')}>
|
|
|
<Select mode="tags" allowClear tokenSeparators={[',']} />
|
|
<Select mode="tags" allowClear tokenSeparators={[',']} />
|
|
|
</FormField>
|
|
</FormField>
|