XTLS/Xray-core · error

Rejected by Postprocessing Stage

Error message

Rejected by Postprocessing Stage 

What it means

Returned by PostProcessConfigureFile when a registered config postprocessing stage (registered via RegisterConfigureFilePostProcessingStage) rejects the config after parsing. The stage name is embedded in the message and the stage's own error is the base cause. This is a lint/normalization hook, not domain validation, so the root cause lives in whichever stage (identified by name in the message) rejected the file.

Source

Thrown at infra/conf/lint.go:21

import "github.com/xtls/xray-core/common/errors"

type ConfigureFilePostProcessingStage interface {
	Process(conf *Config) error
}

var configureFilePostProcessingStages map[string]ConfigureFilePostProcessingStage

func RegisterConfigureFilePostProcessingStage(name string, stage ConfigureFilePostProcessingStage) {
	if configureFilePostProcessingStages == nil {
		configureFilePostProcessingStages = make(map[string]ConfigureFilePostProcessingStage)
	}
	configureFilePostProcessingStages[name] = stage
}

func PostProcessConfigureFile(conf *Config) error {
	for k, v := range configureFilePostProcessingStages {
		if err := v.Process(conf); err != nil {
			return errors.New("Rejected by Postprocessing Stage ", k).AtError().Base(err)
		}
	}
	return nil
}

View on GitHub (pinned to 7d214f8b09)

Solutions

  1. Read the full error chain: the stage name in the message plus the base error tell you which check failed and why
  2. Fix the underlying config condition that the named stage rejected
  3. If the stage is from a custom build/plugin, check that plugin's documentation for its rejection rules
Defensive patterns

Strategy: try-catch

Try / catch

// Go: wrap PostProcessConfigureFile with context
if err := conf.PostProcessConfigureFile(cfg); err != nil {
	return fmt.Errorf("config rejected by postprocessing (check stage name in message): %w", err)
}

Prevention

When it happens

Trigger: Any registered postprocessing stage's Process(conf) returning an error during config load; commonly an XUDP/XTLS lint stage flagging incompatible inbound/outbound combinations in the parsed config.

Common situations: Enabling features that a lint stage considers contradictory; running a custom build with extra registered stages; upgrading Xray where new lint checks were added to existing stages.

Related errors


AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15). Data as JSON: /api/errors/4979fee067bbc020. Report an issue: GitHub.