mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3590] [Feature Request] 需要服务器插件中获取到远程端口 #2865
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#2865
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 @zhangshengping on GitHub (Aug 28, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3590
Describe the feature request
应用过程中需要使用动态端口分配,
客户端的配置中使用了 remote_port = 0,
希望在服务端的插件中拿到实际使用的远程端口号,
看了一下服务端插件post的数据中不包含远程端口号,
是否可以已添加这个字段
Describe alternatives you've considered
No response
Affected area
@fatedier commented on GitHub (Aug 28, 2023):
之前有过类似 issue,如果你希望主动分配端口,可以自行修改这个值。
如果你希望获取被分配到的端口,建议通过 api 查询。
@leadscloud commented on GitHub (May 12, 2025):
这个是怎么通过api查询?目前只能通过管理界面可以拿到 /api/proxy/tcp。能否支持通过plugins解决。
比如
比如在NewUserConn或 NewWorkConn 发送这个remotePort
目前只发送这些数据
{"version":"0.1.0","op":"NewWorkConn","content":{"user":{"user":"","metas":null,"run_id":"7fe7ef2b3a004446"},"run_id":"7fe7ef2b3a004446"}}