{"record":{"id":"a1182b883cc55040","repo":"fatedier/frp","slug":"proxy-s-v","errorCode":null,"errorMessage":"proxy %s: %v","messagePattern":"proxy (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/client.go","lineNumber":210,"sourceCode":"func ValidateAllClientConfig(\n\tc *v1.ClientCommonConfig,\n\tproxyCfgs []v1.ProxyConfigurer,\n\tvisitorCfgs []v1.VisitorConfigurer,\n\tunsafeFeatures *security.UnsafeFeatures,\n) (Warning, error) {\n\tvalidator := NewConfigValidator(unsafeFeatures)\n\tvar warnings Warning\n\tif c != nil {\n\t\twarning, err := validator.ValidateClientCommonConfig(c)\n\t\twarnings = AppendError(warnings, warning)\n\t\tif err != nil {\n\t\t\treturn warnings, err\n\t\t}\n\t}\n\n\tfor _, c := range proxyCfgs {\n\t\tif err := ValidateProxyConfigurerForClient(c); err != nil {\n\t\t\treturn warnings, fmt.Errorf(\"proxy %s: %v\", c.GetBaseConfig().Name, err)\n\t\t}\n\t}\n\n\tfor _, c := range visitorCfgs {\n\t\tif err := ValidateVisitorConfigurer(c); err != nil {\n\t\t\treturn warnings, fmt.Errorf(\"visitor %s: %v\", c.GetBaseConfig().Name, err)\n\t\t}\n\t}\n\treturn warnings, nil\n}\n","sourceCodeStart":192,"sourceCodeEnd":221,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/client.go#L192-L221","documentation":"Aggregate wrapper: ValidateAllClientConfig iterates proxy configs and prefixes each per-proxy validation failure with the proxy's name. The real cause is in the %v inner error produced by ValidateProxyConfigurerForClient (e.g. invalid localPort, unknown plugin, bad remotePort range).","triggerScenarios":"Any [[proxies]] entry whose per-type validation fails — e.g. type \"tcp\" with localPort 0 or > 65535, missing name, invalid plugin options, transport fields violating proxy-level rules. First failing proxy aborts the loop.","commonSituations":"One typo'd proxy block in a large included config; new proxy type fields not supported by the running frp version; port conflicts with range constraints on the server.","solutions":["Read the inner error after the proxy name — it names the exact field and rule","Fix that proxy entry (port range, plugin fields, name syntax) and re-run `frpc verify -c <file>`","Temporarily comment out other proxies to bisect if the inner message is ambiguous"],"exampleFix":"# before\n[[proxies]]\nname = \"ssh\"\ntype = \"tcp\"\nlocalPort = 70000\n\n# after\n[[proxies]]\nname = \"ssh\"\ntype = \"tcp\"\nlocalPort = 22","handlingStrategy":"try-catch","validationCode":"for _, p := range proxyCfgs {\n    if err := validation.ValidateProxyConfigurerForClient(p); err != nil {\n        // surface p.GetBaseConfig().Name + err before startup\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := validation.ValidateAllClientConfig(cc, proxies, visitors, uf); err != nil {\n    if after, ok := strings.CutPrefix(err.Error(), \"proxy \"); ok {\n        name, inner, _ := strings.Cut(after, \": \")\n        // handle per-proxy failure keyed by name\n    }\n}","preventionTips":["Run `frpc verify -c` in CI for every config change","Validate each proxy as it is generated instead of in one big batch"],"tags":["frp","config","proxy","validation","go"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}