{"record":{"id":"4979fee067bbc020","repo":"XTLS/Xray-core","slug":"rejected-by-postprocessing-stage","errorCode":null,"errorMessage":"Rejected by Postprocessing Stage ","messagePattern":"Rejected by Postprocessing Stage ","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/lint.go","lineNumber":21,"sourceCode":"import \"github.com/xtls/xray-core/common/errors\"\n\ntype ConfigureFilePostProcessingStage interface {\n\tProcess(conf *Config) error\n}\n\nvar configureFilePostProcessingStages map[string]ConfigureFilePostProcessingStage\n\nfunc RegisterConfigureFilePostProcessingStage(name string, stage ConfigureFilePostProcessingStage) {\n\tif configureFilePostProcessingStages == nil {\n\t\tconfigureFilePostProcessingStages = make(map[string]ConfigureFilePostProcessingStage)\n\t}\n\tconfigureFilePostProcessingStages[name] = stage\n}\n\nfunc PostProcessConfigureFile(conf *Config) error {\n\tfor k, v := range configureFilePostProcessingStages {\n\t\tif err := v.Process(conf); err != nil {\n\t\t\treturn errors.New(\"Rejected by Postprocessing Stage \", k).AtError().Base(err)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":3,"sourceCodeEnd":26,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/lint.go#L3-L26","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the full error chain: the stage name in the message plus the base error tell you which check failed and why","Fix the underlying config condition that the named stage rejected","If the stage is from a custom build/plugin, check that plugin's documentation for its rejection rules"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Go: wrap PostProcessConfigureFile with context\nif err := conf.PostProcessConfigureFile(cfg); err != nil {\n\treturn fmt.Errorf(\"config rejected by postprocessing (check stage name in message): %w\", err)\n}","preventionTips":["Log the full error chain — the stage name plus base error identify the failing check","After Xray upgrades, re-run configs through a test start to catch newly added lint rejections"],"tags":["xray","config","lint","postprocessing","extensibility"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}