mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-25 23:35:00 +03:00
60da6bed15
The panel seeded xhttp configs with scMaxEachPostBytes=1000000 and scMinPostsIntervalMs=30 — xray-core''s own defaults — and emitted them into every generated config and share link. The literal scMinPostsIntervalMs=30 is a stable DPI fingerprint that Russia''s TSPU keys on to block connections on mobile networks. New configs no longer seed these values (empty schema/template defaults, so xray-core applies its internal defaults). For configs already stored with the old defaults, the link/subscription builders now drop values equal to xray-core''s defaults instead of advertising them — covering panel share links, the raw subscription, and the JSON subscription without requiring every inbound to be re-saved. Non-default values the user set deliberately are still emitted.
184 lines
4.4 KiB
Plaintext
184 lines
4.4 KiB
Plaintext
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses grpc-basic byte-stably 1`] = `
|
|
{
|
|
"grpcSettings": {
|
|
"authority": "grpc.example.test",
|
|
"multiMode": false,
|
|
"serviceName": "GunService",
|
|
},
|
|
"network": "grpc",
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses tcp-none byte-stably 1`] = `
|
|
{
|
|
"network": "tcp",
|
|
"tcpSettings": {
|
|
"acceptProxyProtocol": false,
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses ws-default byte-stably 1`] = `
|
|
{
|
|
"network": "ws",
|
|
"wsSettings": {
|
|
"acceptProxyProtocol": false,
|
|
"headers": {
|
|
"X-Forwarded-Proto": "https",
|
|
},
|
|
"heartbeatPeriod": 30,
|
|
"host": "cdn.example.test",
|
|
"path": "/api/v2",
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses xhttp-basic byte-stably 1`] = `
|
|
{
|
|
"network": "xhttp",
|
|
"xhttpSettings": {
|
|
"enableXmux": false,
|
|
"headers": {},
|
|
"host": "edge.example.test",
|
|
"mode": "auto",
|
|
"noGRPCHeader": false,
|
|
"noSSEHeader": false,
|
|
"path": "/sp",
|
|
"scMaxBufferedPosts": 30,
|
|
"scMaxEachPostBytes": "",
|
|
"scMinPostsIntervalMs": "",
|
|
"scStreamUpServerSecs": "20-80",
|
|
"seqKey": "",
|
|
"seqPlacement": "",
|
|
"serverMaxHeaderBytes": 0,
|
|
"sessionKey": "",
|
|
"sessionPlacement": "",
|
|
"uplinkChunkSize": 0,
|
|
"uplinkDataKey": "",
|
|
"uplinkDataPlacement": "",
|
|
"uplinkHTTPMethod": "",
|
|
"xPaddingBytes": "100-1000",
|
|
"xPaddingHeader": "",
|
|
"xPaddingKey": "",
|
|
"xPaddingMethod": "",
|
|
"xPaddingObfsMode": false,
|
|
"xPaddingPlacement": "",
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses xhttp-extra-padding byte-stably 1`] = `
|
|
{
|
|
"network": "xhttp",
|
|
"xhttpSettings": {
|
|
"enableXmux": false,
|
|
"headers": {},
|
|
"host": "edge.example.test",
|
|
"mode": "stream-up",
|
|
"noGRPCHeader": false,
|
|
"noSSEHeader": false,
|
|
"path": "/sp",
|
|
"scMaxBufferedPosts": 30,
|
|
"scMaxEachPostBytes": "",
|
|
"scMinPostsIntervalMs": "",
|
|
"scStreamUpServerSecs": "20-80",
|
|
"seqKey": "",
|
|
"seqPlacement": "",
|
|
"serverMaxHeaderBytes": 0,
|
|
"sessionKey": "",
|
|
"sessionPlacement": "",
|
|
"uplinkChunkSize": 0,
|
|
"uplinkDataKey": "",
|
|
"uplinkDataPlacement": "",
|
|
"uplinkHTTPMethod": "",
|
|
"xPaddingBytes": "500-1500",
|
|
"xPaddingHeader": "X-Pad",
|
|
"xPaddingKey": "secret-key",
|
|
"xPaddingMethod": "random",
|
|
"xPaddingObfsMode": true,
|
|
"xPaddingPlacement": "header",
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses xhttp-extra-placement byte-stably 1`] = `
|
|
{
|
|
"network": "xhttp",
|
|
"xhttpSettings": {
|
|
"enableXmux": false,
|
|
"headers": {},
|
|
"host": "edge.example.test",
|
|
"mode": "auto",
|
|
"noGRPCHeader": false,
|
|
"noSSEHeader": false,
|
|
"path": "/sp",
|
|
"scMaxBufferedPosts": 30,
|
|
"scMaxEachPostBytes": "",
|
|
"scMinPostsIntervalMs": "",
|
|
"scStreamUpServerSecs": "20-80",
|
|
"seqKey": "X-Seq",
|
|
"seqPlacement": "cookie",
|
|
"serverMaxHeaderBytes": 0,
|
|
"sessionKey": "X-Session",
|
|
"sessionPlacement": "header",
|
|
"uplinkChunkSize": 0,
|
|
"uplinkDataKey": "u",
|
|
"uplinkDataPlacement": "query",
|
|
"uplinkHTTPMethod": "",
|
|
"xPaddingBytes": "100-1000",
|
|
"xPaddingHeader": "",
|
|
"xPaddingKey": "",
|
|
"xPaddingMethod": "",
|
|
"xPaddingObfsMode": false,
|
|
"xPaddingPlacement": "",
|
|
},
|
|
}
|
|
`;
|
|
|
|
exports[`NetworkSettingsSchema fixtures > parses xhttp-extra-tuning byte-stably 1`] = `
|
|
{
|
|
"network": "xhttp",
|
|
"xhttpSettings": {
|
|
"enableXmux": false,
|
|
"headers": {
|
|
"X-Forwarded-For": "10.0.0.1",
|
|
"X-Real-IP": "1.2.3.4",
|
|
},
|
|
"host": "edge.example.test",
|
|
"mode": "packet-up",
|
|
"noGRPCHeader": true,
|
|
"noSSEHeader": true,
|
|
"path": "/sp",
|
|
"scMaxBufferedPosts": 50,
|
|
"scMaxEachPostBytes": "2000000",
|
|
"scMinPostsIntervalMs": "60",
|
|
"scStreamUpServerSecs": "30-90",
|
|
"seqKey": "",
|
|
"seqPlacement": "",
|
|
"serverMaxHeaderBytes": 16384,
|
|
"sessionKey": "",
|
|
"sessionPlacement": "",
|
|
"uplinkChunkSize": 8192,
|
|
"uplinkDataKey": "",
|
|
"uplinkDataPlacement": "",
|
|
"uplinkHTTPMethod": "PUT",
|
|
"xPaddingBytes": "100-1000",
|
|
"xPaddingHeader": "",
|
|
"xPaddingKey": "",
|
|
"xPaddingMethod": "",
|
|
"xPaddingObfsMode": false,
|
|
"xPaddingPlacement": "",
|
|
"xmux": {
|
|
"cMaxReuseTimes": 0,
|
|
"hKeepAlivePeriod": 30,
|
|
"hMaxRequestTimes": "600-900",
|
|
"hMaxReusableSecs": "1800-3000",
|
|
"maxConcurrency": "16-32",
|
|
"maxConnections": 4,
|
|
},
|
|
},
|
|
}
|
|
`;
|