Repository: fatedier/frp (language: go)

Issue:
[Feature Request] 关于allowUsers的命令模式使用方式
### Describe the feature request

**版本0.60.0**

我希望能在文档上增加 allowUsers的命令模式使用方式
希望frpc stcp visitor 能增加--server_user参数的支持


您好，以下是我的探索过程，我参考配置

> allowUsers | []string | 允许访问的 visitor 用户列表，默认只允许同一用户下的 visitor 访问，配置为 * 则允许任何 visitor 访问。

在linux A系统使用
`ssh -R :80:127.0.0.1:22 v0@192.168.1.10 -p 2200 stcp -t Pwd001 -u finallycc -n U001 --sk P001 --allow-users *`
创建stcp，这个* 号不生效 
`ssh -R :80:127.0.0.1:22 v0@192.168.1.10 -p 2200 stcp -t Pwd001 -u finallycc -n U001 --sk P001 --allow-users finallycc `
创建stcp，这个是生效的
在linux B系统使用
`./frpc stcp visitor -s "192.168.1.10" -P 9000 -t Pwd001 --uc --ue -n V001 -u finallycc --server_name U001 --sk P001 --bind_addr "127.0.0.1" --bind_port 22`

能否给我一个例子能正确配置--allow-users 参数？

<hr>
您好，我发现--server_user 这个参数在命令模式下，还未支持，如果可以希望您增加以下
**Usage:
  frpc stcp visitor [flags]

Flags:
      --bind-addr string      bind addr
      --bind-port int         bind port
  -h, --help                  help for visitor
      --server-name string    server name
      --sk string             secret key
      --uc                    use compression
      --ue                    use encryption
  -n, --visitor-name string   visitor name**

<hr>
经过测试 --allow-users U002 和--allow-users "*" 是可以的
但是我如果想设置多个用户呢
我测试了如下场景，都失败了
--allow-users U001 U002
--allow-users "U001" "U002"
--allow-users '["U001","U002"]'
--allow-users [U001,U002]
--allow-users ["U001","U002"]

请问我该如何配置U001 和U002

### Describe alternatives you've considered

_No response_

### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others


Discussion / hints:
<img width="752" alt="image" src="https://github.com/user-attachments/assets/9d22919d-30d2-4dab-a1f7-c0ecc0ee75a6">

> 您好，我发现--server_user 这个参数在命令模式下，还未支持

TODO

Fix patch:
diff --git a/Release.md b/Release.md
index d0414efec04..fed36e2408a 100644
--- a/Release.md
+++ b/Release.md
@@ -1,8 +1,3 @@
 ### Features
 
-* Added a new plugin `tls2raw`: Enables TLS termination and forwarding of decrypted raw traffic to local service.
-* Added a default timeout of 30 seconds for the frpc subcommands to prevent commands from being stuck for a long time due to network issues.
-
-### Fixes
-
-* Fixed the issue that when `loginFailExit = false`, the frpc stop command cannot be stopped correctly if the server is not successfully connected after startup.
+* The frpc visitor command-line parameter adds the `--server-user` option to specify the username of the server-side proxy to connect to.
diff --git a/pkg/config/flags.go b/pkg/config/flags.go
index 98f617be481..ce2582dd84c 100644
--- a/pkg/config/flags.go
+++ b/pkg/config/flags.go
@@ -140,6 +140,7 @@ func registerVisitorBaseConfigFlags(cmd *cobra.Command, c *v1.VisitorBaseConfig,
 	cmd.Flags().BoolVarP(&c.Transport.UseCompression, "uc", "", false, "use compression")
 	cmd.Flags().StringVarP(&c.SecretKey, "sk", "", "", "secret key")
 	cmd.Flags().StringVarP(&c.ServerName, "server_name", "", "", "server name")
+	cmd.Flags().StringVarP(&c.ServerUser, "server-user", "", "", "server user")
 	cmd.Flags().StringVarP(&c.BindAddr, "bind_addr", "", "", "bind addr")
 	cmd.Flags().IntVarP(&c.BindPort, "bind_port", "", 0, "bind port")
 }


Test patch: