{"record":{"id":"ecbb463de751e6e5","repo":"fatedier/frp","slug":"protocol-should-be-kcp-or-quic","errorCode":null,"errorMessage":"protocol should be kcp or quic","messagePattern":"protocol should be kcp or quic","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/visitor.go","lineNumber":59,"sourceCode":"\nfunc validateVisitorBaseConfig(c *v1.VisitorBaseConfig) error {\n\tif c.Name == \"\" {\n\t\treturn errors.New(\"name is required\")\n\t}\n\n\tif c.ServerName == \"\" {\n\t\treturn errors.New(\"server name is required\")\n\t}\n\n\tif c.BindPort == 0 {\n\t\treturn errors.New(\"bind port is required\")\n\t}\n\treturn nil\n}\n\nfunc validateXTCPVisitorConfig(c *v1.XTCPVisitorConfig) error {\n\tif !slices.Contains([]string{\"kcp\", \"quic\"}, c.Protocol) {\n\t\treturn fmt.Errorf(\"protocol should be kcp or quic\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":41,"sourceCodeEnd":63,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/visitor.go#L41-L63","documentation":"Error \"protocol should be kcp or quic\" thrown in fatedier/frp.","triggerScenarios":"Raised by validateXTCPVisitorConfig in pkg/config/v1/validation/visitor.go when an xtcp visitor's protocol field is not \"kcp\" or \"quic\".","commonSituations":"Typo or unsupported transport protocol in an xtcp visitor config. Fix by setting protocol to \"kcp\" or \"quic\".","solutions":["Set protocol to 'kcp' or 'quic' in the xtcp visitor configuration.","Remove the protocol field to use the default protocol."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}