{"record":{"id":"d67330ff306bac36","repo":"fatedier/frp","slug":"invalid-transport-wireprotocol-optional-values-ar","errorCode":null,"errorMessage":"invalid transport.wireProtocol, optional values are %v","messagePattern":"invalid transport\\.wireProtocol, optional values are (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/client.go","lineNumber":172,"sourceCode":"\n\tif !lo.FromPtr(c.TLS.Enable) {\n\t\tcheckTLSConfig := func(name string, value string) Warning {\n\t\t\tif value != \"\" {\n\t\t\t\treturn fmt.Errorf(\"%s is invalid when transport.tls.enable is false\", name)\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\n\t\twarnings = AppendError(warnings, checkTLSConfig(\"transport.tls.certFile\", c.TLS.CertFile))\n\t\twarnings = AppendError(warnings, checkTLSConfig(\"transport.tls.keyFile\", c.TLS.KeyFile))\n\t\twarnings = AppendError(warnings, checkTLSConfig(\"transport.tls.trustedCaFile\", c.TLS.TrustedCaFile))\n\t}\n\n\tif !slices.Contains(SupportedTransportProtocols, c.Protocol) {\n\t\terrs = AppendError(errs, fmt.Errorf(\"invalid transport.protocol, optional values are %v\", SupportedTransportProtocols))\n\t}\n\tif !slices.Contains(SupportedWireProtocols, c.WireProtocol) {\n\t\terrs = AppendError(errs, fmt.Errorf(\"invalid transport.wireProtocol, optional values are %v\", SupportedWireProtocols))\n\t}\n\treturn warnings, errs\n}\n\nfunc validateIncludeFiles(files []string) (Warning, error) {\n\tvar errs error\n\tfor _, f := range files {\n\t\tabsDir, err := filepath.Abs(filepath.Dir(f))\n\t\tif err != nil {\n\t\t\terrs = AppendError(errs, fmt.Errorf(\"include: parse directory of %s failed: %v\", f, err))\n\t\t\tcontinue\n\t\t}\n\t\tif _, err := os.Stat(absDir); os.IsNotExist(err) {\n\t\t\terrs = AppendError(errs, fmt.Errorf(\"include: directory of %s not exist\", f))\n\t\t}\n\t}\n\treturn nil, errs\n}","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/client.go#L154-L190","documentation":"transport.wireProtocol is not in SupportedWireProtocols. The wire protocol selects the framing/algebra over the transport (e.g. \"legacy\" yamux-style framing vs alternatives); an unrecognized value is rejected at config validation time with the allowed list in the message.","triggerScenarios":"transport.wireProtocol explicitly set to a string outside the supported set — e.g. \"smux\", \"http2\", or a misspelling of a valid value like \"legcy\".","commonSituations":"Experimenting with newer multiplexing options on an older frp version that doesn't include them; typo; copying docs from a different frp branch where the enum differs.","solutions":["Use one of the values listed in the error message (commonly \"legacy\")","Remove transport.wireProtocol to use the default","Upgrade (or align) frpc/frps versions so both ends support the chosen wire protocol"],"exampleFix":"# before\n[transport]\nwireProtocol = \"smux\"\n\n# after\n[transport]\nwireProtocol = \"legacy\"","handlingStrategy":"validation","validationCode":"func validWireProtocol(w string) bool {\n    return slices.Contains(validation.SupportedWireProtocols, w)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Leave wireProtocol unset unless you specifically need an alternative","Match wireProtocol on frpc and frps of the same release"],"tags":["frp","config","transport","wire-protocol","go"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}