mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 20:54:14 +00:00
Move the inbound TLS and Reality stream-security blocks out of InboundFormModal into presentational components under inbounds/form/security/. The Radio.Group security selector stays in the modal; TlsForm and RealityForm receive their cert/key/ECH generation handlers and the saving flag as props. InboundFormModal drops from 2105 to 1708 lines. Add inbound-form-blocks.test.tsx: render-snapshot coverage for each extracted transport (raw/ws/grpc/kcp/httpupgrade/xhttp) and security (tls/reality) component in isolation inside a minimal Form. The full modal cannot exercise the stream/security tabs in jsdom because they are gated behind Form.useWatch values that do not propagate in the test harness, so component-level snapshots are the regression net for these blocks. No behavior change.
98 lines
1.7 KiB
Text
98 lines
1.7 KiB
Text
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`inbound security forms > RealityForm field structure is stable 1`] = `
|
|
[
|
|
"Show",
|
|
"Xver",
|
|
"uTLS",
|
|
"Target",
|
|
"SNI",
|
|
"Max Time Diff (ms)",
|
|
"Min Client Ver",
|
|
"Max Client Ver",
|
|
"Short IDs",
|
|
"SpiderX",
|
|
"Public Key",
|
|
"Private Key",
|
|
"mldsa65 Seed",
|
|
"mldsa65 Verify",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound security forms > TlsForm field structure is stable 1`] = `
|
|
[
|
|
"SNI",
|
|
"Cipher Suites",
|
|
"Min/Max Version",
|
|
"uTLS",
|
|
"ALPN",
|
|
"Reject Unknown SNI",
|
|
"Disable System Root",
|
|
"Session Resumption",
|
|
"Digital Certificate",
|
|
"ECH key",
|
|
"ECH config",
|
|
"Pinned Peer Cert SHA-256",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > GrpcForm field structure is stable 1`] = `
|
|
[
|
|
"Service Name",
|
|
"Authority",
|
|
"Multi Mode",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > HttpUpgradeForm field structure is stable 1`] = `
|
|
[
|
|
"Proxy Protocol",
|
|
"Host",
|
|
"Path",
|
|
"Headers",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > KcpForm field structure is stable 1`] = `
|
|
[
|
|
"MTU",
|
|
"TTI (ms)",
|
|
"Uplink (MB/s)",
|
|
"Downlink (MB/s)",
|
|
"CWND Multiplier",
|
|
"Max Sending Window",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > RawForm field structure is stable 1`] = `
|
|
[
|
|
"Proxy Protocol",
|
|
"HTTP Obfuscation",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > WsForm field structure is stable 1`] = `
|
|
[
|
|
"Proxy Protocol",
|
|
"Host",
|
|
"Path",
|
|
"Heartbeat Period",
|
|
"Headers",
|
|
]
|
|
`;
|
|
|
|
exports[`inbound transport forms > XhttpForm field structure is stable 1`] = `
|
|
[
|
|
"Host",
|
|
"Path",
|
|
"Mode",
|
|
"Server Max Header Bytes",
|
|
"Padding Bytes",
|
|
"Headers",
|
|
"Uplink HTTP Method",
|
|
"Padding Obfs Mode",
|
|
"Session Placement",
|
|
"Sequence Placement",
|
|
"No SSE Header",
|
|
]
|
|
`;
|