{"record":{"id":"14cc715a096d0103","repo":"XTLS/Xray-core","slug":"can-not-use-downloadsettings-in-stream-one-mod","errorCode":null,"errorMessage":"Can not use \"downloadSettings\" in \"stream-one\" mode.","messagePattern":"Can not use \"downloadSettings\" in \"stream-one\" mode\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/transport_method.go","lineNumber":501,"sourceCode":"\t\tScMinPostsIntervalMs: newRangeConfig(c.ScMinPostsIntervalMs),\n\t\tScMaxBufferedPosts:   c.ScMaxBufferedPosts,\n\t\tScStreamUpServerSecs: newRangeConfig(c.ScStreamUpServerSecs),\n\t\tServerMaxHeaderBytes: c.ServerMaxHeaderBytes,\n\t\tSessionIDTable:       c.SessionIDTable,\n\t\tSessionIDLength:      newRangeConfig(c.SessionIDLength),\n\t\tXmux: &splithttp.XmuxConfig{\n\t\t\tMaxConcurrency:   newRangeConfig(c.Xmux.MaxConcurrency),\n\t\t\tMaxConnections:   newRangeConfig(c.Xmux.MaxConnections),\n\t\t\tCMaxReuseTimes:   newRangeConfig(c.Xmux.CMaxReuseTimes),\n\t\t\tHMaxRequestTimes: newRangeConfig(c.Xmux.HMaxRequestTimes),\n\t\t\tHMaxReusableSecs: newRangeConfig(c.Xmux.HMaxReusableSecs),\n\t\t\tHKeepAlivePeriod: c.Xmux.HKeepAlivePeriod,\n\t\t},\n\t}\n\n\tif c.DownloadSettings != nil {\n\t\tif c.Mode == \"stream-one\" {\n\t\t\treturn nil, errors.New(`Can not use \"downloadSettings\" in \"stream-one\" mode.`)\n\t\t}\n\t\tvar err error\n\t\tif config.DownloadSettings, err = c.DownloadSettings.Build(); err != nil {\n\t\t\treturn nil, errors.New(`Failed to build \"downloadSettings\".`).Base(err)\n\t\t}\n\t}\n\n\treturn config, nil\n}\n\nfunc roomSize(tableSize int, min, max int32) *big.Int {\n\tbase := big.NewInt(int64(tableSize))\n\tsum := new(big.Int)\n\tterm := new(big.Int)\n\tfor k := min; k <= max; k++ {\n\t\tterm.Exp(base, big.NewInt(int64(k)), nil)\n\t\tsum.Add(sum, term)\n\t}","sourceCodeStart":483,"sourceCodeEnd":519,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/transport_method.go#L483-L519","documentation":"At the end of SplitHTTPConfig.Build(), a present \"downloadSettings\" (a *StreamConfig, i.e. a full separate transport stream settings for the downlink) is rejected when mode is \"stream-one\" (transport_method.go:499-502). stream-one uses a single bidirectional HTTP connection, so a separate download transport is contradictory by definition.","triggerScenarios":"\"mode\": \"stream-one\" together with a \"downloadSettings\": {\"transportSettings\": ...} block in the same splithttp transportSettings. Common when converting a stream-up config (where downloadSettings is the normal way to split up/down transports) to stream-one without removing the block.","commonSituations":"Migrating from splithttp/stream-up asymmetric-CDN setups to stream-one; templates that always include downloadSettings; clientside configs generated for stream-up reused with the mode line changed.","solutions":["Delete the \"downloadSettings\" block when using \"mode\": \"stream-one\"","Or keep downloadSettings and switch mode to \"packet-up\"/\"stream-up\"/\"auto\""],"exampleFix":"// before\n\"mode\": \"stream-one\", \"downloadSettings\": { \"transportSettings\": { \"transport\": \"tcp\" } }\n// after\n\"mode\": \"stream-one\"","handlingStrategy":"validation","validationCode":"// Go: stream-one has no separate download transport\nif cfg.DownloadSettings != nil && cfg.Mode == \"stream-one\" {\n\treturn errors.New(\"remove downloadSettings for stream-one mode\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["downloadSettings belongs to split up/down modes only","When switching mode to stream-one, strip downloadSettings"],"tags":["config","splithttp","mode","download-settings"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}