{"record":{"id":"e69dd9a7fa42fe7c","repo":"XTLS/Xray-core","slug":"failed-to-build-inbound-handler-for-protocol-c-pr","errorCode":null,"errorMessage":"failed to build inbound handler for protocol {c.Protocol}","messagePattern":"failed to build inbound handler for protocol (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/xray.go","lineNumber":203,"sourceCode":"\t\t\treturn nil, errors.New(\"failed to build sniffing config\").Base(err)\n\t\t}\n\t\treceiverSettings.SniffingSettings = s\n\t}\n\n\tsettings := []byte(\"{}\")\n\tif c.Settings != nil {\n\t\tsettings = ([]byte)(*c.Settings)\n\t}\n\trawConfig, err := inboundConfigLoader.LoadWithID(settings, c.Protocol)\n\tif err != nil {\n\t\treturn nil, errors.New(\"failed to load inbound detour config for protocol \", c.Protocol).Base(err)\n\t}\n\tif dokodemoConfig, ok := rawConfig.(*DokodemoConfig); ok {\n\t\treceiverSettings.ReceiveOriginalDestination = dokodemoConfig.FollowRedirect\n\t}\n\tts, err := rawConfig.(Buildable).Build()\n\tif err != nil {\n\t\treturn nil, errors.New(\"failed to build inbound handler for protocol \", c.Protocol).Base(err)\n\t}\n\n\treturn &core.InboundHandlerConfig{\n\t\tTag:              c.Tag,\n\t\tReceiverSettings: serial.ToTypedMessage(receiverSettings),\n\t\tProxySettings:    serial.ToTypedMessage(ts),\n\t}, nil\n}\n\ntype OutboundDetourConfig struct {\n\tProtocol       string           `json:\"protocol\"`\n\tSendThrough    *string          `json:\"sendThrough\"`\n\tTag            string           `json:\"tag\"`\n\tSettings       *json.RawMessage `json:\"settings\"`\n\tStreamSetting  *StreamConfig    `json:\"streamSettings\"`\n\tProxySettings  *ProxyConfig     `json:\"proxySettings\"`\n\tMuxSettings    *MuxConfig       `json:\"mux\"`\n\tTargetStrategy string           `json:\"targetStrategy\"`","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/xray.go#L185-L221","documentation":"Error \"failed to build inbound handler for protocol {c.Protocol}\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at infra/conf/xray.go:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}