XTLS/Xray-core · error

failed to load outbound detour config for protocol

Error message

failed to load outbound detour config for protocol 

What it means

The outbound's raw 'settings' JSON could not be parsed/validated by the config loader registered for the declared protocol — either the protocol name is unknown or the settings do not match the protocol's schema.

Solutions

  1. Verify the protocol name is spelled correctly and supported
  2. Validate the outbound 'settings' JSON against the protocol's expected schema
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at infra/conf/xray.go:359 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/0c8c55443f70459c. Report an issue: GitHub.

Appendix: source

Thrown at infra/conf/xray.go:359

		}
		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)
	}

	return &core.OutboundHandlerConfig{
		SenderSettings: serial.ToTypedMessage(senderSettings),
		Tag:            c.Tag,
		ProxySettings:  serial.ToTypedMessage(ts),
	}, nil
}

type StatsConfig struct{}

View on GitHub (pinned to 7d214f8b09)