{"record":{"id":"99916c8181692de3","repo":"XTLS/Xray-core","slug":"interval-must-be-at-least-5","errorCode":null,"errorMessage":"Interval must be at least 5","messagePattern":"Interval must be at least 5","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_internet.go","lineNumber":257,"sourceCode":"\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}\n\t\t\tif c.FinalMask.QuicParams.MaxIdleTimeout != 0 && (c.FinalMask.QuicParams.MaxIdleTimeout < 4 || c.FinalMask.QuicParams.MaxIdleTimeout > 120) {\n\t\t\t\treturn nil, errors.New(\"MaxIdleTimeout must be between 4 and 120\")\n\t\t\t}\n\t\t\tif c.FinalMask.QuicParams.KeepAlivePeriod != 0 && (c.FinalMask.QuicParams.KeepAlivePeriod < 2 || c.FinalMask.QuicParams.KeepAlivePeriod > 60) {","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_internet.go#L239-L275","documentation":"Range check on the UDP hop interval under finalMask.quicParams.udpHop.interval: a non-zero From or To below 5 is rejected (0 means unset and is allowed). Units follow the config schema (seconds). It exists to prevent hop intervals so short they would thrash connections.","triggerScenarios":"\"udpHop\": { \"interval\": { \"from\": 2 } } or any non-zero endpoint below 5.","commonSituations":"Tuning hop intervals down for faster rotation without knowing the floor; setting milliseconds where seconds are expected (making values tiny); copying aggressive values from other tools.","solutions":["Raise both from and to to at least 5 (or remove them for the default).","Keep from <= to so the range is meaningful.","Confirm the field's unit in the config docs before tuning."],"exampleFix":"// before\n\"udpHop\": { \"interval\": { \"from\": 1, \"to\": 3 } }\n// after\n\"udpHop\": { \"interval\": { \"from\": 5, \"to\": 10 } }","handlingStrategy":"validation","validationCode":"func udpHopIntervalOK(qp map[string]any) bool {\n    uh, _ := qp[\"udpHop\"].(map[string]any)\n    iv, _ := uh[\"interval\"].(map[string]any)\n    for _, k := range []string{\"from\", \"to\"} {\n        if v, ok := iv[k].(float64); ok && v != 0 && v < 5 { return false }\n    }\n    return true\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clamp the interval UI/schema to a minimum of 5.","Confirm units (seconds) before tuning.","Keep 0 as the sentinel for 'unset' rather than using tiny non-zero values."],"tags":["go","xray","config","quic","udp-hop","validation"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}