XTLS/Xray-core · error

not an inbound proxy.

Error message

not an inbound proxy.

What it means

Error "not an inbound proxy." thrown in XTLS/Xray-core.

Source

Thrown at app/proxyman/inbound/always.go:82

	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,
		proxy:          p,
		mux:            mux.NewServer(ctx),
		tag:            tag,
	}

	uplinkCounter, downlinkCounter := getStatCounter(core.MustFromContext(ctx), tag)

	nl := p.Network()
	pl := receiverConfig.PortList
	address := receiverConfig.Listen.AsAddress()
	if address == nil {
		address = net.AnyIP
	}

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at app/proxyman/inbound/always.go:82 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/c8c3946e777c5607. Report an issue: GitHub.