fix(ipsec): показывать неопределённый статус при общих Remote ID
This commit is contained in:
1 parent
7815e00a1c
commit
cb6ec09312
20 files changed
+1077
-15
No files matched your search
@@ -31,12 +31,16 @@ export const ipsecClientDtoSchema = z.object({
|
||||
modeConfigName: z.string().optional(),
|
||||
peerName: z.string().optional(),
|
||||
online: z.boolean(),
|
||||
/** One native session ID matches several clients; online/address are not confirmed. */
|
||||
sessionAmbiguous: z.boolean().optional(),
|
||||
activeAddress: z.string().optional(),
|
||||
activeSince: z.string().optional(),
|
||||
disabled: z.boolean(),
|
||||
comment: z.string().optional(),
|
||||
/** Создан менеджером (managed-комментарий). */
|
||||
managed: z.boolean(),
|
||||
}).refine(c => !c.sessionAmbiguous || (!c.online && !c.activeAddress && !c.activeSince), {
|
||||
message: "Неоднозначная сессия IPsec не может подтверждать online или активный адрес",
|
||||
})
|
||||
|
||||
/** Слушатель IKEv2 — /ip/ipsec/peer (passive). */
|
||||
@@ -115,6 +119,7 @@ export const ipsecServerSummaryDtoSchema = z.object({
|
||||
natRuleManaged: z.boolean(),
|
||||
clientsTotal: z.number().int().nonnegative(),
|
||||
clientsOnline: z.number().int().nonnegative(),
|
||||
clientsSessionAmbiguous: z.number().int().nonnegative().optional(),
|
||||
/** Все сертификаты роутера (managed + существующие). */
|
||||
certs: z.array(ipsecCertInfoDtoSchema).optional(),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user