{"record":{"id":"35b8dade63203a80","repo":"XTLS/Xray-core","slug":"unknown-bbr-profile","errorCode":null,"errorMessage":"unknown bbr profile","messagePattern":"unknown bbr profile","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_internet.go","lineNumber":226,"sourceCode":"\t\t\t}\n\t\t\tconfig.Tcpmasks = append(config.Tcpmasks, serial.ToTypedMessage(u))\n\t\t}\n\t\tfor _, mask := range c.FinalMask.Udp {\n\t\t\tu, err := mask.Build(false)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.New(\"failed to build mask with type \", mask.Type).Base(err)\n\t\t\t}\n\t\t\tconfig.Udpmasks = append(config.Udpmasks, serial.ToTypedMessage(u))\n\t\t}\n\t\tif c.FinalMask.QuicParams != nil {\n\t\t\tprofile := strings.ToLower(c.FinalMask.QuicParams.BbrProfile)\n\t\t\tswitch profile {\n\t\t\tcase \"\", string(bbr.ProfileConservative), string(bbr.ProfileStandard), string(bbr.ProfileAggressive):\n\t\t\t\tif profile == \"\" {\n\t\t\t\t\tprofile = string(bbr.ProfileStandard)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn nil, errors.New(\"unknown bbr profile\")\n\t\t\t}\n\n\t\t\tup, err := c.FinalMask.QuicParams.BrutalUp.Bps()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tdown, err := c.FinalMask.QuicParams.BrutalDown.Bps()\n\t\t\tif err != nil {\n\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","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_internet.go#L208-L244","documentation":"Thrown when streamSettings.finalMask.quicParams.bbrProfile (after lowercasing) is not one of '', 'conservative', 'standard', or 'aggressive' (the bbr.Profile values). Empty is allowed and normalized to 'standard'. Any other string is rejected before the QuicParams block is built.","triggerScenarios":"Setting \"quicParams\": { \"bbrProfile\": \"fast\" } (or any string besides conservative/standard/aggressive) under finalMask.","commonSituations":"Guessing profile names ('high', 'max', 'balanced') instead of the three defined bbr profiles; capitalization is fine (case-insensitive) but the word itself must match.","solutions":["Set bbrProfile to one of: \"conservative\", \"standard\", \"aggressive\".","Or remove the field entirely to get the default 'standard' profile."],"exampleFix":"// before\n\"quicParams\": { \"bbrProfile\": \"fast\" }\n// after\n\"quicParams\": { \"bbrProfile\": \"aggressive\" }","handlingStrategy":"validation","validationCode":"var validBbrProfiles = map[string]bool{\"\": true, \"conservative\": true, \"standard\": true, \"aggressive\": true}\n\nfunc bbrProfileOK(qp map[string]any) bool {\n    p, _ := qp[\"bbrProfile\"].(string)\n    return validBbrProfiles[strings.ToLower(p)]\n}","typeGuard":"func hasBbrProfile(qp map[string]any) bool {\n    _, ok := qp[\"bbrProfile\"]\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Expose bbrProfile as an enum in your config generator (not free text).","Treat the profile list (conservative/standard/aggressive) as versioned API; re-check on upgrade.","Omit the field when the default standard profile is acceptable."],"tags":["go","xray","config","quic","bbr","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}