diff --git a/frontend/src/pages/inbounds/form/InboundFormModal.tsx b/frontend/src/pages/inbounds/form/InboundFormModal.tsx index 575329f39..6d238f5e6 100644 --- a/frontend/src/pages/inbounds/form/InboundFormModal.tsx +++ b/frontend/src/pages/inbounds/form/InboundFormModal.tsx @@ -691,13 +691,13 @@ export default function InboundFormModal({ {isFallbackHost && fallbacksCard} {(protocol === Protocols.VLESS || protocol === Protocols.TROJAN) && network === 'tcp' && !isFallbackHost && ( - - )} + + )} ); @@ -749,6 +749,12 @@ export default function InboundFormModal({ udp: [...udp, { type: 'mkcp-legacy', settings: { header: '', value: '' } }], }; } + } else { + const fm = cleaned.finalmask as Record | undefined; + if (fm && Array.isArray(fm.udp)) { + const udp = (fm.udp as unknown[]).filter((m) => (m as { type?: string })?.type !== 'mkcp-legacy'); + cleaned.finalmask = { ...fm, udp }; + } } form.setFieldValue('streamSettings', cleaned); };