fatedier/frp · error
invalid transport.wireProtocol, optional values are %v
Error message
invalid transport.wireProtocol, optional values are %v
What it means
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.
Source
Thrown at pkg/config/v1/validation/client.go:172
if !lo.FromPtr(c.TLS.Enable) {
checkTLSConfig := func(name string, value string) Warning {
if value != "" {
return fmt.Errorf("%s is invalid when transport.tls.enable is false", name)
}
return nil
}
warnings = AppendError(warnings, checkTLSConfig("transport.tls.certFile", c.TLS.CertFile))
warnings = AppendError(warnings, checkTLSConfig("transport.tls.keyFile", c.TLS.KeyFile))
warnings = AppendError(warnings, checkTLSConfig("transport.tls.trustedCaFile", c.TLS.TrustedCaFile))
}
if !slices.Contains(SupportedTransportProtocols, c.Protocol) {
errs = AppendError(errs, fmt.Errorf("invalid transport.protocol, optional values are %v", SupportedTransportProtocols))
}
if !slices.Contains(SupportedWireProtocols, c.WireProtocol) {
errs = AppendError(errs, fmt.Errorf("invalid transport.wireProtocol, optional values are %v", SupportedWireProtocols))
}
return warnings, errs
}
func validateIncludeFiles(files []string) (Warning, error) {
var errs error
for _, f := range files {
absDir, err := filepath.Abs(filepath.Dir(f))
if err != nil {
errs = AppendError(errs, fmt.Errorf("include: parse directory of %s failed: %v", f, err))
continue
}
if _, err := os.Stat(absDir); os.IsNotExist(err) {
errs = AppendError(errs, fmt.Errorf("include: directory of %s not exist", f))
}
}
return nil, errs
}View on GitHub (pinned to 6c8a8d0a97)
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
Example fix
# before [transport] wireProtocol = "smux" # after [transport] wireProtocol = "legacy"
Defensive patterns
Strategy: validation
Validate before calling
func validWireProtocol(w string) bool {
return slices.Contains(validation.SupportedWireProtocols, w)
} Prevention
- Leave wireProtocol unset unless you specifically need an alternative
- Match wireProtocol on frpc and frps of the same release
When it happens
Trigger: transport.wireProtocol explicitly set to a string outside the supported set — e.g. "smux", "http2", or a misspelling of a valid value like "legcy".
Common situations: 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.
Related errors
- invalid transport.heartbeatTimeout, heartbeat timeout should
- %s is invalid when transport.tls.enable is false
- invalid transport.protocol, optional values are %v
- exec configuration is required when type is 'exec'
- file path cannot be empty
AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15).
Data as JSON: /api/errors/d67330ff306bac36.
Report an issue: GitHub.