mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
Round out Step 3b. Four more inbound fixtures complete the protocol set (http with two accounts, mixed with socks-style auth, tunnel with a port map, hysteria v1). Two parallel test files cover the other DUs: stream.test.ts walks tcp/ws/grpc fixtures through NetworkSettingsSchema, and security.test.ts walks none/tls/reality through SecuritySettingsSchema. Snapshot count is now 16 across three test files. The reality fixture locks in the array form of serverNames/shortIds (the panel class stores them comma-joined internally but they ship as arrays on the wire). The TLS fixture pins the file-vs-inline cert DU on the file branch. Stream coverage for httpupgrade/xhttp/kcp and security mixed-with-stream combos follow in the next turn, alongside the shadow harness.
72 lines
1.6 KiB
Text
72 lines
1.6 KiB
Text
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`SecuritySettingsSchema fixtures > parses none byte-stably 1`] = `
|
|
{
|
|
"security": "none",
|
|
}
|
|
`;
|
|
|
|
exports[`SecuritySettingsSchema fixtures > parses reality-basic byte-stably 1`] = `
|
|
{
|
|
"realitySettings": {
|
|
"maxClientVer": "",
|
|
"maxTimediff": 0,
|
|
"minClientVer": "",
|
|
"mldsa65Seed": "",
|
|
"privateKey": "wM-2_oQRWXyLcXhV5q1ifTBcS3K8mYR3wQI3PqGFK1k",
|
|
"serverNames": [
|
|
"yahoo.com",
|
|
"www.yahoo.com",
|
|
],
|
|
"settings": {
|
|
"fingerprint": "chrome",
|
|
"mldsa65Verify": "",
|
|
"publicKey": "Tx5yj1bRcOPHkdvT2pIAQ2zh0gQ8m4OPdnzqXJxxV3o",
|
|
"serverName": "",
|
|
"spiderX": "/",
|
|
},
|
|
"shortIds": [
|
|
"a3f1",
|
|
"b8c2",
|
|
"d9e4",
|
|
],
|
|
"show": false,
|
|
"target": "yahoo.com:443",
|
|
"xver": 0,
|
|
},
|
|
"security": "reality",
|
|
}
|
|
`;
|
|
|
|
exports[`SecuritySettingsSchema fixtures > parses tls-cert-file byte-stably 1`] = `
|
|
{
|
|
"security": "tls",
|
|
"tlsSettings": {
|
|
"alpn": [
|
|
"h2",
|
|
"http/1.1",
|
|
],
|
|
"certificates": [
|
|
{
|
|
"buildChain": false,
|
|
"certificateFile": "/etc/ssl/certs/cdn.example.test.crt",
|
|
"keyFile": "/etc/ssl/private/cdn.example.test.key",
|
|
"oneTimeLoading": false,
|
|
"usage": "encipherment",
|
|
},
|
|
],
|
|
"cipherSuites": "",
|
|
"disableSystemRoot": false,
|
|
"echServerKeys": "",
|
|
"enableSessionResumption": false,
|
|
"maxVersion": "1.3",
|
|
"minVersion": "1.2",
|
|
"rejectUnknownSni": false,
|
|
"serverName": "cdn.example.test",
|
|
"settings": {
|
|
"echConfigList": "",
|
|
"fingerprint": "chrome",
|
|
},
|
|
},
|
|
}
|
|
`;
|