fatedier/frp · error
bandwidth limit mode should be client or server
Error message
bandwidth limit mode should be client or server
What it means
Error "bandwidth limit mode should be client or server" thrown in fatedier/frp.
Source
Thrown at pkg/config/v1/validation/proxy.go:40
"k8s.io/apimachinery/pkg/util/validation"
v1 "github.com/fatedier/frp/pkg/config/v1"
)
func validateProxyBaseConfigForClient(c *v1.ProxyBaseConfig) error {
if c.Name == "" {
return errors.New("name should not be empty")
}
if err := ValidateAnnotations(c.Annotations); err != nil {
return err
}
if !slices.Contains([]string{"", "v1", "v2"}, c.Transport.ProxyProtocolVersion) {
return fmt.Errorf("not support proxy protocol version: %s", c.Transport.ProxyProtocolVersion)
}
if !slices.Contains([]string{"client", "server"}, c.Transport.BandwidthLimitMode) {
return fmt.Errorf("bandwidth limit mode should be client or server")
}
if c.Plugin.Type == "" {
if err := ValidatePort(c.LocalPort, "localPort"); err != nil {
return fmt.Errorf("localPort: %v", err)
}
}
if !slices.Contains([]string{"", "tcp", "http"}, c.HealthCheck.Type) {
return fmt.Errorf("not support health check type: %s", c.HealthCheck.Type)
}
if c.HealthCheck.Type != "" {
if c.HealthCheck.Type == "http" &&
c.HealthCheck.Path == "" {
return fmt.Errorf("health check path should not be empty")
}
}
View on GitHub (pinned to 6c8a8d0a97)
Solutions
- Set transport.bandwidthLimitMode to 'client' or 'server'.
- Use 'client' to limit the bandwidth on the frpc side, or 'server' to limit it on the frps side.
When it happens
Trigger: Raised by validateProxyBaseConfigForClient in pkg/config/v1/validation/proxy.go when transport.bandwidthLimitMode is set to a value other than "client" or "server".
Common situations: Misspelled or mis-cased bandwidth limit mode in the proxy config. Fix by setting transport.bandwidthLimitMode to "client" or "server".
AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15).
Data as JSON: /api/errors/c838d267b8223264.
Report an issue: GitHub.