Repository: fatedier/frp (language: go)

Issue:
[Feature Request] add metadatas to `frpc` proxy commands
### Describe the feature request

If we are using the server plugin for e.g. multiple user auth, it would be nice to be able to use the cli command with commandline params instead of a config file. Therefore we need to make sure to provide metadatas.

Probably something like  `frpc http --user bar --metadatas token=foo ...`  (see https://github.com/spf13/pflag/pull/133/) ?

### Describe alternatives you've considered

_No response_

### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [X] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others


Discussion / hints:
I think it's okay.

Fix patch:
diff --git a/Release.md b/Release.md
index d75b07cb7c2..046e4d48039 100644
--- a/Release.md
+++ b/Release.md
@@ -1,5 +1,3 @@
 ### Features
 
-* `tzdata` is installed by default in the container image, and the time zone can be set using the `TZ` environment variable.
-* The `quic-bind-port` command line parameter is supported in frps, which specifies the port for accepting frpc connections using the QUIC protocol.
-* The vhost HTTP proxy of frps supports the h2c protocol.
+* Support metadatas and annotations in frpc proxy commands.
diff --git a/pkg/config/flags.go b/pkg/config/flags.go
index f9d9e3e4495..6027b622411 100644
--- a/pkg/config/flags.go
+++ b/pkg/config/flags.go
@@ -106,6 +106,8 @@ func registerProxyBaseConfigFlags(cmd *cobra.Command, c *v1.ProxyBaseConfig, opt
 	}
 
 	cmd.Flags().StringVarP(&c.Name, "proxy_name", "n", "", "proxy name")
+	cmd.Flags().StringToStringVarP(&c.Metadatas, "metadatas", "", nil, "metadata key-value pairs (e.g., key1=value1,key2=value2)")
+	cmd.Flags().StringToStringVarP(&c.Annotations, "annotations", "", nil, "annotation key-value pairs (e.g., key1=value1,key2=value2)")
 
 	if !options.sshMode {
 		cmd.Flags().StringVarP(&c.LocalIP, "local_ip", "i", "127.0.0.1", "local ip")


Test patch: