mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2664] [Feature Request] frp 服务端端口管理 #2126
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HR1025 on GitHub (Nov 18, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2664
Describe the feature request
你好,请问 frp 有适用于这种场景的解决方案吗?
场景:
我们想将 frp 作为作为维护线下 IOT 设备的一种手段,比如说远程gdb调试我们的IOT设备,使用 ftp 把IOT设备上的日志拉回来,暴露设备上的流 RTMP、RTSP,还有我们 IOT 设备上是有一个小型的 web serve 的,我们可以通过它获取一些设备信息。
这个场景比较特殊的地方在于:
1 - 暴露端口的时间短 —— 很多时候是设备出现问题的时候,我们才会去 gdb,弄完就关掉内网穿透了
2 - IOT设备多 —— 导致很容易服务器的端口碰撞
需求:
针对于这种应用场景,我们希望在服务器端可以指定一段范围的端口,交付给 frps 管理;然后客户端不指定远程端口,由 fpcs 自行分配并提供一种方式告知我们,例如说在 DashBoard 里面有所展示,或者可以通过一些 HTTP 的 API 获取动态分配的端口,就像是 NAT 那样 (好像路有点奇怪,我就是因为 NAT 所以才要内网穿透,但是我又想要它的动态端口分配)。
如果这项功能没有的话,我们打算自行设计管理服务器的端口使用;由于我们是 C++ 开发的,所以应该是用其他方式管理端口。
实现:
这里给出我自己的初步实现想法,我想到的方法是使用 UUID 来标识每一台 IOT 设备,从而可以正确地分辨出每一个连接来自哪一个设备;然后把所有 IOT 设备使用的端口号同一管理。
Describe alternatives you've considered
No response
Affected area
@xqzr commented on GitHub (Nov 20, 2021):
https://gofrp.org/docs/features/common/server-manage/#%E7%AB%AF%E5%8F%A3%E7%99%BD%E5%90%8D%E5%8D%95
frpc.ini
remote_port = 0随机端口@HR1025 commented on GitHub (Nov 21, 2021):
好的,谢谢了,没有注意到。
---原始邮件---
发件人: @.>
发送时间: 2021年11月21日(周日) 凌晨3:41
收件人: @.>;
抄送: "haorui @.@.>;
主题: Re: [fatedier/frp] [Feature Request] frp 服务端端口管理 (Issue #2664)
https://gofrp.org/docs/features/common/server-manage/#%E7%AB%AF%E5%8F%A3%E7%99%BD%E5%90%8D%E5%8D%95
frpc.ini
remote_port = 0 随机端口
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.