XTLS/Xray-core · error
Can not use "downloadSettings" in "stream-one" mode.
Error message
Can not use "downloadSettings" in "stream-one" mode.
What it means
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.
Source
Thrown at infra/conf/transport_method.go:501
ScMinPostsIntervalMs: newRangeConfig(c.ScMinPostsIntervalMs),
ScMaxBufferedPosts: c.ScMaxBufferedPosts,
ScStreamUpServerSecs: newRangeConfig(c.ScStreamUpServerSecs),
ServerMaxHeaderBytes: c.ServerMaxHeaderBytes,
SessionIDTable: c.SessionIDTable,
SessionIDLength: newRangeConfig(c.SessionIDLength),
Xmux: &splithttp.XmuxConfig{
MaxConcurrency: newRangeConfig(c.Xmux.MaxConcurrency),
MaxConnections: newRangeConfig(c.Xmux.MaxConnections),
CMaxReuseTimes: newRangeConfig(c.Xmux.CMaxReuseTimes),
HMaxRequestTimes: newRangeConfig(c.Xmux.HMaxRequestTimes),
HMaxReusableSecs: newRangeConfig(c.Xmux.HMaxReusableSecs),
HKeepAlivePeriod: c.Xmux.HKeepAlivePeriod,
},
}
if c.DownloadSettings != nil {
if c.Mode == "stream-one" {
return nil, errors.New(`Can not use "downloadSettings" in "stream-one" mode.`)
}
var err error
if config.DownloadSettings, err = c.DownloadSettings.Build(); err != nil {
return nil, errors.New(`Failed to build "downloadSettings".`).Base(err)
}
}
return config, nil
}
func roomSize(tableSize int, min, max int32) *big.Int {
base := big.NewInt(int64(tableSize))
sum := new(big.Int)
term := new(big.Int)
for k := min; k <= max; k++ {
term.Exp(base, big.NewInt(int64(k)), nil)
sum.Add(sum, term)
}View on GitHub (pinned to 7d214f8b09)
Solutions
- Delete the "downloadSettings" block when using "mode": "stream-one"
- Or keep downloadSettings and switch mode to "packet-up"/"stream-up"/"auto"
Example fix
// before
"mode": "stream-one", "downloadSettings": { "transportSettings": { "transport": "tcp" } }
// after
"mode": "stream-one" Defensive patterns
Strategy: validation
Validate before calling
// Go: stream-one has no separate download transport
if cfg.DownloadSettings != nil && cfg.Mode == "stream-one" {
return errors.New("remove downloadSettings for stream-one mode")
} Prevention
- downloadSettings belongs to split up/down modes only
- When switching mode to stream-one, strip downloadSettings
When it happens
Trigger: "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.
Common situations: 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.
Related errors
- unsupported mode:
- UplinkDataPlacement can be only in packet-up mode
- uplinkHTTPMethod can be GET only in packet-up mode
- Failed to build "downloadSettings".
- Failed to unmarshal "extra".
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/14cc715a096d0103.
Report an issue: GitHub.