{"record":{"id":"a13dbe93d1b0e218","repo":"fatedier/frp","slug":"unixpath-is-required","errorCode":null,"errorMessage":"unixPath is required","messagePattern":"unixPath is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/plugin.go","lineNumber":71,"sourceCode":"}\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\nfunc validateStaticFilePluginOptions(c *v1.StaticFilePluginOptions) error {\n\tif c.LocalPath == \"\" {\n\t\treturn errors.New(\"localPath is required\")\n\t}\n\treturn nil\n}\n\nfunc validateUnixDomainSocketPluginOptions(c *v1.UnixDomainSocketPluginOptions) error {\n\tif c.UnixPath == \"\" {\n\t\treturn errors.New(\"unixPath is required\")\n\t}\n\treturn nil\n}\n\nfunc validateTLS2RawPluginOptions(c *v1.TLS2RawPluginOptions) error {\n\tif c.LocalAddr == \"\" {\n\t\treturn errors.New(\"localAddr is required\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":53,"sourceCodeEnd":82,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/plugin.go#L53-L82","documentation":"Validation error from validateUnixDomainSocketPluginOptions: the unix_domain_socket plugin is configured but UnixPath is empty. The plugin proxies frps traffic to a local Unix domain socket, so the socket file path is mandatory. Enforced during client-side proxy config validation.","triggerScenarios":"A proxy with plugin = \"unix_domain_socket\" whose plugin options lack unixPath — e.g. the plugin block exists but no path key, or the key was written as localAddr/path instead of unixPath.","commonSituations":"Exposing a Docker daemon socket, a database over UDS, or CRI runtime sockets without specifying the socket file; carrying over a TCP plugin template and leaving the wrong address field; typos like unixpath or unix_path.","solutions":["Add unixPath = \"/var/run/docker.sock\" (path to the local Unix socket) in the plugin options.","Ensure the frpc process user has read/write permission on the socket file.","Use the exact key unixPath — not localAddr, which belongs to other plugins."],"exampleFix":"# before\n[[proxies]]\nname = \"docker\"\ntype = \"tcp\"\nremotePort = 6000\n[proxies.plugin]\ntype = \"unix_domain_socket\"\n\n# after\n[[proxies]]\nname = \"docker\"\ntype = \"tcp\"\nremotePort = 6000\n[proxies.plugin]\ntype = \"unix_domain_socket\"\nunixPath = \"/var/run/docker.sock\"","handlingStrategy":"validation","validationCode":"if pluginType == \"unix_domain_socket\" && pluginOpts.UnixPath == \"\" {\n    return errors.New(\"unix_domain_socket plugin requires unixPath\")\n}","typeGuard":"func udsPluginComplete(o *v1.UnixDomainSocketPluginOptions) bool {\n    return o != nil && o.UnixPath != \"\"\n}","tryCatchPattern":"if err := validation.ValidateProxyConfigurerForClient(cfg); err != nil {\n    if strings.Contains(err.Error(), \"unixPath is required\") {\n        // add unixPath = \"/var/run/docker.sock\" to the plugin options\n    }\n    return err\n}","preventionTips":["Remember the key is unixPath — not localAddr or path.","Check the socket file exists and permissions allow the frpc user.","Guard docker.sock exposure with auth on the frps side."],"tags":["config","plugin","unix-socket","validation","frpc"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}