{"record":{"id":"f694255509ebbacd","repo":"fatedier/frp","slug":"localport-v","errorCode":null,"errorMessage":"localPort: %v","messagePattern":"localPort: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/proxy.go","lineNumber":45,"sourceCode":"\nfunc validateProxyBaseConfigForClient(c *v1.ProxyBaseConfig) error {\n\tif c.Name == \"\" {\n\t\treturn errors.New(\"name should not be empty\")\n\t}\n\n\tif err := ValidateAnnotations(c.Annotations); err != nil {\n\t\treturn err\n\t}\n\tif !slices.Contains([]string{\"\", \"v1\", \"v2\"}, c.Transport.ProxyProtocolVersion) {\n\t\treturn fmt.Errorf(\"not support proxy protocol version: %s\", c.Transport.ProxyProtocolVersion)\n\t}\n\tif !slices.Contains([]string{\"client\", \"server\"}, c.Transport.BandwidthLimitMode) {\n\t\treturn fmt.Errorf(\"bandwidth limit mode should be client or server\")\n\t}\n\n\tif c.Plugin.Type == \"\" {\n\t\tif err := ValidatePort(c.LocalPort, \"localPort\"); err != nil {\n\t\t\treturn fmt.Errorf(\"localPort: %v\", err)\n\t\t}\n\t}\n\n\tif !slices.Contains([]string{\"\", \"tcp\", \"http\"}, c.HealthCheck.Type) {\n\t\treturn fmt.Errorf(\"not support health check type: %s\", c.HealthCheck.Type)\n\t}\n\tif c.HealthCheck.Type != \"\" {\n\t\tif c.HealthCheck.Type == \"http\" &&\n\t\t\tc.HealthCheck.Path == \"\" {\n\t\t\treturn fmt.Errorf(\"health check path should not be empty\")\n\t\t}\n\t}\n\n\tif c.Plugin.Type != \"\" {\n\t\tif err := ValidateClientPluginOptions(c.Plugin.ClientPluginOptions); err != nil {\n\t\t\treturn fmt.Errorf(\"plugin %s: %v\", c.Plugin.Type, err)\n\t\t}\n\t}","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/proxy.go#L27-L63","documentation":"Error \"localPort: %v\" thrown in fatedier/frp.","triggerScenarios":"Raised by validateProxyBaseConfigForClient in pkg/config/v1/validation/proxy.go when no plugin is configured and localPort fails ValidatePort (outside the range 0..65535).","commonSituations":"localPort is negative, larger than 65535, or otherwise invalid for a proxy without a plugin. Fix by setting localPort to a value in 0..65535, or configure a plugin if no local port is needed.","solutions":["Set localPort to a valid port number in the range 0..65535.","Check for typing errors in the localPort value of the proxy configuration."],"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-15T17:31:12.345Z"}