{"record":{"id":"577420e77c5431fd","repo":"fatedier/frp","slug":"localaddr-is-required","errorCode":null,"errorMessage":"localAddr is required","messagePattern":"localAddr is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/plugin.go","lineNumber":43,"sourceCode":"\tcase *v1.HTTP2HTTPSPluginOptions:\n\t\treturn validateHTTP2HTTPSPluginOptions(v)\n\tcase *v1.HTTPS2HTTPPluginOptions:\n\t\treturn validateHTTPS2HTTPPluginOptions(v)\n\tcase *v1.HTTPS2HTTPSPluginOptions:\n\t\treturn validateHTTPS2HTTPSPluginOptions(v)\n\tcase *v1.StaticFilePluginOptions:\n\t\treturn validateStaticFilePluginOptions(v)\n\tcase *v1.UnixDomainSocketPluginOptions:\n\t\treturn validateUnixDomainSocketPluginOptions(v)\n\tcase *v1.TLS2RawPluginOptions:\n\t\treturn validateTLS2RawPluginOptions(v)\n\t}\n\treturn nil\n}\n\nfunc validateHTTP2HTTPSPluginOptions(c *v1.HTTP2HTTPSPluginOptions) error {\n\tif c.LocalAddr == \"\" {\n\t\treturn errors.New(\"localAddr is required\")\n\t}\n\treturn nil\n}\n\nfunc validateHTTPS2HTTPPluginOptions(c *v1.HTTPS2HTTPPluginOptions) error {\n\tif c.LocalAddr == \"\" {\n\t\treturn errors.New(\"localAddr is required\")\n\t}\n\treturn nil\n}\n\nfunc validateHTTPS2HTTPSPluginOptions(c *v1.HTTPS2HTTPSPluginOptions) error {\n\tif c.LocalAddr == \"\" {\n\t\treturn errors.New(\"localAddr is required\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/plugin.go#L25-L61","documentation":"Validation error from validateHTTP2HTTPSPluginOptions: an frpc proxy uses the http2https plugin but its LocalAddr is empty. The http2https plugin forwards HTTP traffic from the frps side to a local HTTPS service, so it must know the local address (host:port) to dial. This check runs during ValidateProxyConfigurerForClient at client config load.","triggerScenarios":"A [[proxies]] entry with plugin = \"http2https\" that has no localAddr in its plugin options (e.g. only plugin type set, or options under the wrong TOML table so LocalAddr decodes to \"\").","commonSituations":"Copy-pasting an http_proxy plugin block and switching the type to http2https without adding localAddr; nesting plugin options at the proxy level instead of under [proxies.plugin]; forgetting that https (not plain http) local services need this plugin with an explicit target address.","solutions":["Add localAddr = \"127.0.0.1:8443\" (host:port of the local HTTPS service) to the plugin options.","Verify the options sit under the plugin's options table (e.g. [proxies.plugin]) so they actually decode into HTTP2HTTPSPluginOptions.","Confirm the local service actually speaks TLS on that address if you chose http2https."],"exampleFix":"# before\n[[proxies]]\nname = \"web\"\ntype = \"tcp\"\n[proxies.plugin]\ntype = \"http2https\"\n\n# after\n[[proxies]]\nname = \"web\"\ntype = \"tcp\"\n[proxies.plugin]\ntype = \"http2https\"\nlocalAddr = \"127.0.0.1:8443\"","handlingStrategy":"validation","validationCode":"// before validating proxies\nif p, ok := cfg.(*v1.HTTP2HTTPSPluginOptions); ok {\n    _ = p\n}\n// simpler: check the decoded typed options\nif typed.Type == \"http2https\" && typed.HTTP2HTTPS.LocalAddr == \"\" {\n    return errors.New(\"http2https plugin requires localAddr\")\n}","typeGuard":"func http2httpsComplete(o *v1.HTTP2HTTPSPluginOptions) bool {\n    return o != nil && o.LocalAddr != \"\"\n}","tryCatchPattern":"if err := validation.ValidateProxyConfigurerForClient(cfg); err != nil {\n    if strings.Contains(err.Error(), \"localAddr is required\") {\n        // add localAddr = \"host:port\" to the http2https plugin options\n    }\n    return err\n}","preventionTips":["Use a config template per plugin type that already includes its mandatory fields.","Run frpc verify -c frpc.toml before deploying.","Remember localAddr has no default; every http2https/https2http(s)/tls2raw plugin needs it explicitly."],"tags":["config","plugin","http2https","validation","frpc"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}