[GH-ISSUE #4476] [Feature Request] 关于allowUsers的命令模式使用方式 #3535

Closed
opened 2026-05-05 14:16:25 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @finallycc on GitHub (Oct 9, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4476

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 参数?


您好,我发现--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**


经过测试 --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
Originally created by @finallycc on GitHub (Oct 9, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4476 ### 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
Author
Owner

@fatedier commented on GitHub (Oct 9, 2024):

image
<!-- gh-comment-id:2401213386 --> @fatedier commented on GitHub (Oct 9, 2024): <img width="752" alt="image" src="https://github.com/user-attachments/assets/9d22919d-30d2-4dab-a1f7-c0ecc0ee75a6">
Author
Owner

@fatedier commented on GitHub (Oct 9, 2024):

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

TODO

<!-- gh-comment-id:2401214503 --> @fatedier commented on GitHub (Oct 9, 2024): > 您好,我发现--server_user 这个参数在命令模式下,还未支持 TODO
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3535
No description provided.