{"record":{"id":"c99ccf7e5905cfba","repo":"XTLS/Xray-core","slug":"unknown-congestion-control-c-finalmask-quicpar","errorCode":null,"errorMessage":"unknown congestion control:  + c.FinalMask.QuicParams.Congestion + , valid values: reno, bbr, brutal, force-brutal","messagePattern":"unknown congestion control:  \\+ c\\.FinalMask\\.QuicParams\\.Congestion \\+ , valid values: reno, bbr, brutal, force-brutal","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_internet.go","lineNumber":253,"sourceCode":"\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tif up > 0 && up < 65536 {\n\t\t\t\treturn nil, errors.New(\"BrutalUp must be at least 65536 bytes per second\")\n\t\t\t}\n\t\t\tif down > 0 && down < 65536 {\n\t\t\t\treturn nil, errors.New(\"BrutalDown must be at least 65536 bytes per second\")\n\t\t\t}\n\n\t\t\tc.FinalMask.QuicParams.Congestion = strings.ToLower(c.FinalMask.QuicParams.Congestion)\n\t\t\tswitch c.FinalMask.QuicParams.Congestion {\n\t\t\tcase \"\", \"brutal\", \"reno\", \"bbr\":\n\t\t\tcase \"force-brutal\":\n\t\t\t\tif up == 0 {\n\t\t\t\t\treturn nil, errors.New(\"force-brutal requires up\")\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn nil, errors.New(\"unknown congestion control: \", c.FinalMask.QuicParams.Congestion, \", valid values: reno, bbr, brutal, force-brutal\")\n\t\t\t}\n\n\t\t\tif (c.FinalMask.QuicParams.UdpHop.Interval.From != 0 && c.FinalMask.QuicParams.UdpHop.Interval.From < 5) || (c.FinalMask.QuicParams.UdpHop.Interval.To != 0 && c.FinalMask.QuicParams.UdpHop.Interval.To < 5) {\n\t\t\t\treturn nil, errors.New(\"Interval must be at least 5\")\n\t\t\t}\n\n\t\t\tif c.FinalMask.QuicParams.InitStreamReceiveWindow > 0 && c.FinalMask.QuicParams.InitStreamReceiveWindow < 16384 {\n\t\t\t\treturn nil, errors.New(\"InitStreamReceiveWindow must be at least 16384\")\n\t\t\t}\n\t\t\tif c.FinalMask.QuicParams.MaxStreamReceiveWindow > 0 && c.FinalMask.QuicParams.MaxStreamReceiveWindow < 16384 {\n\t\t\t\treturn nil, errors.New(\"MaxStreamReceiveWindow must be at least 16384\")\n\t\t\t}\n\t\t\tif c.FinalMask.QuicParams.InitConnectionReceiveWindow > 0 && c.FinalMask.QuicParams.InitConnectionReceiveWindow < 16384 {\n\t\t\t\treturn nil, errors.New(\"InitConnectionReceiveWindow must be at least 16384\")\n\t\t\t}\n\t\t\tif c.FinalMask.QuicParams.MaxConnectionReceiveWindow > 0 && c.FinalMask.QuicParams.MaxConnectionReceiveWindow < 16384 {\n\t\t\t\treturn nil, errors.New(\"MaxConnectionReceiveWindow must be at least 16384\")\n\t\t\t}","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_internet.go#L235-L271","documentation":"Enumerates the allowed congestion control algorithms for finalMask.quicParams: '', 'brutal', 'reno', 'bbr', and 'force-brutal' (the latter additionally requires brutalUp). The value is lowercased first, so case does not matter, but any other string is rejected with the valid values listed in the message.","triggerScenarios":"\"quicParams\": { \"congestion\": \"cubic\" } or any string other than reno/bbr/brutal/force-brutal.","commonSituations":"Assuming standard QUIC names like 'cubic' or 'newreno' are supported; typos ('bbrr', 'Bruno'); leftover experimental names from older forks.","solutions":["Set congestion to one of: \"reno\", \"bbr\", \"brutal\", \"force-brutal\" (case-insensitive).","Remove the field to use the default (empty string is accepted).","If you intended fixed-rate, use \"force-brutal\" and also set brutalUp >= 65536 B/s."],"exampleFix":"// before\n\"quicParams\": { \"congestion\": \"cubic\" }\n// after\n\"quicParams\": { \"congestion\": \"bbr\" }","handlingStrategy":"validation","validationCode":"var validCongestion = map[string]bool{\"\": true, \"brutal\": true, \"reno\": true, \"bbr\": true, \"force-brutal\": true}\n\nfunc congestionOK(qp map[string]any) bool {\n    c, _ := qp[\"congestion\"].(string)\n    return validCongestion[strings.ToLower(c)]\n}","typeGuard":"type Congestion string\n\nfunc (c Congestion) Valid() bool {\n    switch strings.ToLower(string(c)) {\n    case \"\", \"brutal\", \"reno\", \"bbr\", \"force-brutal\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Offer congestion control as a dropdown/enum in tooling, never free text.","Remember only four values exist; standard QUIC names like cubic are not supported.","Lowercase user input before validating (the builder is case-insensitive)."],"tags":["go","xray","config","quic","congestion-control","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}