XTLS/Xray-core · error

not a ReceiverConfig

Error message

not a ReceiverConfig

What it means

Type-guard failure in NewHandler: the inbound's receiverSettings protobuf could be deserialized, but its concrete type is not *proxyman.ReceiverConfig — i.e. the config message registered for the inbound is not the expected receiver settings type (config/schema mismatch). Logged at Error level.

Solutions

  1. Ensure the inbound config uses the current xray protobuf schema
  2. Regenerate/fix the protobuf-encoded config
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at app/proxyman/inbound/inbound.go:168 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/5852c2a0ee5ed058. Report an issue: GitHub.

Appendix: source

Thrown at app/proxyman/inbound/inbound.go:168

	return nil
}

// NewHandler creates a new inbound.Handler based on the given config.
func NewHandler(ctx context.Context, config *core.InboundHandlerConfig) (inbound.Handler, error) {
	rawReceiverSettings, err := config.ReceiverSettings.GetInstance()
	if err != nil {
		return nil, err
	}
	proxySettings, err := config.ProxySettings.GetInstance()
	if err != nil {
		return nil, err
	}
	tag := config.Tag

	receiverSettings, ok := rawReceiverSettings.(*proxyman.ReceiverConfig)
	if !ok {
		return nil, errors.New("not a ReceiverConfig").AtError()
	}

	streamSettings := receiverSettings.StreamSettings
	if streamSettings != nil && streamSettings.SocketSettings != nil {
		ctx = session.ContextWithSockopt(ctx, &session.Sockopt{
			Mark: streamSettings.SocketSettings.Mark,
		})
	}
	if streamSettings != nil && streamSettings.ProtocolName == "splithttp" {
		ctx = session.ContextWithAllowedNetwork(ctx, net.Network_UDP)
	}

	return NewAlwaysOnInboundHandler(ctx, tag, receiverSettings, proxySettings)
}

func init() {
	common.Must(common.RegisterConfig((*proxyman.InboundConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
		return New(ctx, config.(*proxyman.InboundConfig))

View on GitHub (pinned to 7d214f8b09)