XTLS/Xray-core · error
failed to build Mux config
Error message
failed to build Mux config
What it means
Returned when OutboundDetourConfig.Build fails to convert the JSON mux settings (MuxSettings.Build) into the internal MultiplexingConfig, e.g. an invalid concurrency value or malformed mux object in the outbound section.
Solutions
- Fix or remove the 'mux' block in the outbound config
- Check that mux fields (concurrency, enabled) have valid types and ranges
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at infra/conf/xray.go:348 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/dc4e840aebbd906a.
Report an issue: GitHub.
Appendix: source
Thrown at infra/conf/xray.go:348
if ps.TransportLayerProxy {
if senderSettings.StreamSettings != nil {
if senderSettings.StreamSettings.SocketSettings != nil {
senderSettings.StreamSettings.SocketSettings.DialerProxy = ps.Tag
} else {
senderSettings.StreamSettings.SocketSettings = &internet.SocketConfig{DialerProxy: ps.Tag}
}
} else {
senderSettings.StreamSettings = &internet.StreamConfig{SocketSettings: &internet.SocketConfig{DialerProxy: ps.Tag}}
}
ps = nil
}
senderSettings.ProxySettings = ps
}
if c.MuxSettings != nil {
ms, err := c.MuxSettings.Build()
if err != nil {
return nil, errors.New("failed to build Mux config").Base(err)
}
senderSettings.MultiplexSettings = ms
}
settings := []byte("{}")
if c.Settings != nil {
settings = ([]byte)(*c.Settings)
}
rawConfig, err := outboundConfigLoader.LoadWithID(settings, c.Protocol)
if err != nil {
return nil, errors.New("failed to load outbound detour config for protocol ", c.Protocol).Base(err)
}
if err := validateOutboundTransportSecurity(rawConfig, senderSettings); err != nil {
return nil, err
}
ts, err := rawConfig.(Buildable).Build()
if err != nil {
return nil, errors.New("failed to build outbound handler for protocol ", c.Protocol).Base(err)View on GitHub (pinned to 7d214f8b09)