XTLS/Xray-core · error
failed to parse stream config
Error message
failed to parse stream config
What it means
Type-guard failure in NewAlwaysOnInboundHandler: proxyman.BuildSniffingRequest rejected receiverConfig.SniffingSettings (invalid sniffing configuration such as unknown destOverride protocol or invalid metadataOnly/routeOnly combination). The error is passed through unwrapped, so this line only re-raises it.
Solutions
- Fix the inbound's sniffing settings (valid destOverride values, valid routeOnly/metadataOnly flags)
- Remove sniffing block if not needed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/proxyman/inbound/always.go:69 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/1f4452c4ca2de579.
Report an issue: GitHub.
Appendix: source
Thrown at app/proxyman/inbound/always.go:69
mux *mux.Server
tag string
}
func NewAlwaysOnInboundHandler(ctx context.Context, tag string, receiverConfig *proxyman.ReceiverConfig, proxyConfig interface{}) (*AlwaysOnInboundHandler, error) {
sniffingRequest, err := proxyman.BuildSniffingRequest(receiverConfig.SniffingSettings)
if err != nil {
return nil, err
}
src := net.TCPDestination(net.AnyIP, 0)
if receiverConfig.Listen != nil {
src.Address = receiverConfig.Listen.AsAddress()
}
if receiverConfig.PortList != nil && len(receiverConfig.PortList.Range) > 0 {
src.Port = net.Port(receiverConfig.PortList.Range[0].From)
}
mss, err := internet.ToMemoryStreamConfig(receiverConfig.StreamSettings)
if err != nil {
return nil, errors.New("failed to parse stream config").Base(err).AtWarning()
}
newCtx := session.ContextWithInbound(ctx, &session.Inbound{Tag: tag, Source: src})
newCtx = session.ContextWithContent(newCtx, &session.Content{SniffingRequest: sniffingRequest})
newCtx = session.ContextWithStreamSettings(newCtx, mss)
rawProxy, err := common.CreateObject(newCtx, proxyConfig)
if err != nil {
return nil, err
}
p, ok := rawProxy.(proxy.Inbound)
if !ok {
return nil, errors.New("not an inbound proxy.")
}
h := &AlwaysOnInboundHandler{
receiverConfig: receiverConfig,
proxyConfig: proxyConfig,View on GitHub (pinned to 7d214f8b09)