mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-10 23:25:02 +03:00
1c050f872a
xray-core 26.6 grew the finalmask surface the editor could not express, and the finalmask watch drops any key without a registered field, so a config written by hand lost these keys on the next save: - header-custom items can capture their bytes into a variable, reuse one or emit a transform expression; a Kind select keeps each item to exactly one kind, as the core requires, and only parsed JSON reaches transform; - TCP header-custom gains the errors group (the reply sent when a client group does not match), UDP header-custom its prefix/standalone mode; - sudoku is offered as a UDP mask, and share links keep it in fm=; - the noise reset is an Int32Range, so it now takes "60-120" as well. The new golden fixture is saved unchanged by the outbound editor and built by xray-core in TestGoldenStreamFixturesBuildInXray.
425 lines
8.2 KiB
Plaintext
425 lines
8.2 KiB
Plaintext
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses combined byte-stably 1`] = `
|
|
{
|
|
"quicParams": {
|
|
"brutalDown": "200 mbps",
|
|
"brutalUp": "100 mbps",
|
|
"congestion": "brutal",
|
|
"udpHop": {
|
|
"interval": "5-10",
|
|
"ports": "10000-20000",
|
|
},
|
|
},
|
|
"tcp": [
|
|
{
|
|
"settings": {
|
|
"length": "10-20",
|
|
"packets": "1-3",
|
|
},
|
|
"type": "fragment",
|
|
},
|
|
],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"password": "swordfish",
|
|
},
|
|
"type": "salamander",
|
|
},
|
|
{
|
|
"settings": {
|
|
"header": "wireguard",
|
|
"value": "",
|
|
},
|
|
"type": "mkcp-legacy",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses header-custom-variables byte-stably 1`] = `
|
|
{
|
|
"tcp": [
|
|
{
|
|
"settings": {
|
|
"clients": [
|
|
[
|
|
{
|
|
"capture": "nonce",
|
|
"delay": 0,
|
|
"rand": 8,
|
|
"type": "array",
|
|
},
|
|
{
|
|
"delay": 0,
|
|
"packet": "HELLO",
|
|
"type": "str",
|
|
},
|
|
],
|
|
],
|
|
"errors": [
|
|
[
|
|
{
|
|
"delay": 0,
|
|
"packet": "DENIED",
|
|
"type": "str",
|
|
},
|
|
],
|
|
],
|
|
"servers": [
|
|
[
|
|
{
|
|
"delay": 0,
|
|
"reuse": "nonce",
|
|
},
|
|
{
|
|
"delay": 0,
|
|
"transform": {
|
|
"args": [
|
|
{
|
|
"bytes": "OK ",
|
|
"type": "str",
|
|
},
|
|
{
|
|
"reuse": "nonce",
|
|
},
|
|
],
|
|
"op": "concat",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
"type": "header-custom",
|
|
},
|
|
],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"client": [
|
|
{
|
|
"capture": "token",
|
|
"rand": 8,
|
|
"type": "array",
|
|
},
|
|
],
|
|
"mode": "standalone",
|
|
"server": [
|
|
{
|
|
"reuse": "token",
|
|
},
|
|
],
|
|
},
|
|
"type": "header-custom",
|
|
},
|
|
{
|
|
"settings": {
|
|
"ascii": "prefer_entropy",
|
|
"paddingMax": 7,
|
|
"paddingMin": 2,
|
|
"password": "s3cr3t",
|
|
},
|
|
"type": "sudoku",
|
|
},
|
|
{
|
|
"settings": {
|
|
"noise": [
|
|
{
|
|
"delay": "10-16",
|
|
"rand": "10-20",
|
|
"type": "array",
|
|
},
|
|
],
|
|
"reset": "60-120",
|
|
},
|
|
"type": "noise",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses quic-params byte-stably 1`] = `
|
|
{
|
|
"quicParams": {
|
|
"bbrProfile": "standard",
|
|
"congestion": "bbr",
|
|
"debug": false,
|
|
"disablePathMTUDiscovery": false,
|
|
"initConnectionReceiveWindow": 20971520,
|
|
"initStreamReceiveWindow": 8388608,
|
|
"keepAlivePeriod": 10,
|
|
"maxConnectionReceiveWindow": 20971520,
|
|
"maxIdleTimeout": 30,
|
|
"maxIncomingStreams": 1024,
|
|
"maxStreamReceiveWindow": 8388608,
|
|
"udpHop": {
|
|
"interval": "5-10",
|
|
"ports": "20000-50000",
|
|
},
|
|
},
|
|
"tcp": [],
|
|
"udp": [],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses quic-params-flags byte-stably 1`] = `
|
|
{
|
|
"quicParams": {
|
|
"brutalDisableLossCompensation": true,
|
|
"brutalDown": "100 mbps",
|
|
"brutalUp": "60 mbps",
|
|
"congestion": "brutal",
|
|
"disableChromeParrot": true,
|
|
"disableGSO": true,
|
|
"disablePathMTUDiscovery": false,
|
|
"disableStatelessReset": true,
|
|
},
|
|
"tcp": [],
|
|
"udp": [],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses realm-tls byte-stably 1`] = `
|
|
{
|
|
"tcp": [],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"stunServers": [
|
|
"stun.l.google.com:19302",
|
|
],
|
|
"tlsConfig": {
|
|
"allowInsecure": false,
|
|
"alpn": [
|
|
"h3",
|
|
],
|
|
"fingerprint": "chrome",
|
|
"serverName": "example.com",
|
|
},
|
|
"url": "realm://public@example.com/my-realm",
|
|
},
|
|
"type": "realm",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses salamander-gecko byte-stably 1`] = `
|
|
{
|
|
"tcp": [],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"packetSize": "100-200",
|
|
"password": "swordfish",
|
|
},
|
|
"type": "salamander",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses tcp-fragment-segments byte-stably 1`] = `
|
|
{
|
|
"tcp": [
|
|
{
|
|
"settings": {
|
|
"delays": [
|
|
"5-10",
|
|
"0",
|
|
],
|
|
"lengths": [
|
|
"10-20",
|
|
"50-100",
|
|
],
|
|
"maxSplit": "0",
|
|
"packets": "tlshello",
|
|
},
|
|
"type": "fragment",
|
|
},
|
|
],
|
|
"udp": [],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses tcp-mask byte-stably 1`] = `
|
|
{
|
|
"tcp": [
|
|
{
|
|
"settings": {
|
|
"delay": "5-10",
|
|
"length": "10-20",
|
|
"maxSplit": "0",
|
|
"packets": "1-3",
|
|
},
|
|
"type": "fragment",
|
|
},
|
|
{
|
|
"type": "sudoku",
|
|
},
|
|
{
|
|
"settings": {
|
|
"clients": [
|
|
[
|
|
{
|
|
"delay": 0,
|
|
"packet": "GET / HTTP/1.1",
|
|
"type": "str",
|
|
},
|
|
],
|
|
],
|
|
"errors": [],
|
|
"servers": [
|
|
[
|
|
{
|
|
"delay": 0,
|
|
"packet": "HTTP/1.1 200 OK",
|
|
"type": "str",
|
|
},
|
|
],
|
|
],
|
|
},
|
|
"type": "header-custom",
|
|
},
|
|
{
|
|
"settings": {
|
|
"hostname": "mc.example.com",
|
|
"password": "s3cr3t",
|
|
"profiles": [
|
|
{
|
|
"texturesSignature": "Zm9yLWZpeHR1cmUtdXNlLW9ubHktbm90LWEtcmVhbC1tb2phbmctc2lnbmF0dXJl",
|
|
"texturesValue": "eyJ0aW1lc3RhbXAiOjE3MDAwMDAwMDAwMDAsInByb2ZpbGVJZCI6ImVjNzBiY2FmNzAyZjRiYjhiNDhkMjc2ZmE1MmE3ODBjIn0=",
|
|
"username": "Dream",
|
|
"uuid": "ec70bcaf-702f-4bb8-b48d-276fa52a780c",
|
|
},
|
|
],
|
|
},
|
|
"type": "xmc",
|
|
},
|
|
],
|
|
"udp": [],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses udp-hop byte-stably 1`] = `
|
|
{
|
|
"tcp": [],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"interval": "5-10",
|
|
"mode": "intervalremote",
|
|
"remoteIPs": [
|
|
"203.0.113.0/24",
|
|
],
|
|
"remotePorts": "20000-50000",
|
|
},
|
|
"type": "udphop",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`FinalMaskStreamSettingsSchema fixtures > parses udp-mask byte-stably 1`] = `
|
|
{
|
|
"tcp": [],
|
|
"udp": [
|
|
{
|
|
"settings": {
|
|
"password": "swordfish",
|
|
},
|
|
"type": "salamander",
|
|
},
|
|
{
|
|
"settings": {
|
|
"header": "",
|
|
"value": "abcdef0123456789",
|
|
},
|
|
"type": "mkcp-legacy",
|
|
},
|
|
{
|
|
"settings": {
|
|
"header": "dns",
|
|
"value": "cloudflare.com",
|
|
},
|
|
"type": "mkcp-legacy",
|
|
},
|
|
{
|
|
"settings": {
|
|
"header": "wireguard",
|
|
"value": "",
|
|
},
|
|
"type": "mkcp-legacy",
|
|
},
|
|
{
|
|
"settings": {
|
|
"noise": [
|
|
{
|
|
"delay": "10-16",
|
|
"rand": "10-20",
|
|
"type": "array",
|
|
},
|
|
{
|
|
"delay": "5",
|
|
"packet": "ping",
|
|
"type": "str",
|
|
},
|
|
],
|
|
"reset": "60",
|
|
},
|
|
"type": "noise",
|
|
},
|
|
{
|
|
"settings": {
|
|
"domains": [
|
|
{
|
|
"edns0": 1232,
|
|
"names": [
|
|
"example.com",
|
|
],
|
|
"types": [
|
|
16,
|
|
],
|
|
},
|
|
{
|
|
"edns0": 1232,
|
|
"names": [
|
|
"example.org",
|
|
],
|
|
"types": [
|
|
1,
|
|
],
|
|
},
|
|
],
|
|
"resolvers": [
|
|
{
|
|
"addrs": [
|
|
"udp://1.1.1.1:53",
|
|
],
|
|
},
|
|
],
|
|
},
|
|
"type": "xdns",
|
|
},
|
|
{
|
|
"settings": {
|
|
"dgram": false,
|
|
"ips": [],
|
|
},
|
|
"type": "xicmp",
|
|
},
|
|
{
|
|
"settings": {
|
|
"stunServers": [
|
|
"stun.l.google.com:19302",
|
|
"global.stun.twilio.com:3478",
|
|
],
|
|
"url": "realm://public@example.com/my-realm",
|
|
},
|
|
"type": "realm",
|
|
},
|
|
],
|
|
}
|
|
`;
|