mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2977] [Feature Request] XTCP Client使用固定端口号 #2378
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#2378
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 @scp-r on GitHub (Jun 13, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2977
Describe the feature request
网络
使用场景
我的使用场景是希望通过FRP的XTCP连接,实现从主机A访问到主机B(完全通过IPv6),但是通过具体测试来看似乎每次主机B提供的连接端口都是一个随机端口,这样就不得不在OpenWRT中配置打开该主机的全部端口。希望能通过提供配置项的形式来指定主机B在指定端口上接受xtcp的p2p连接。
其他
目前FRP在处理IPv6地址上似乎存在问题,我在本地编译时修改了两处ResolveUDPAddr的调用,能够实现在开放全部端口的情况下正常使用xtcp。这两处包括:
client/visitor.go的第215行、client/proxy.go的第310行。如果将这两处构造地址的表达式从%s:%d改成[%s]:%d即可正常处理IPv6地址(但是这样就不能处理IPv4地址,具体解决方法肯定不是这样直接修改的)为什么不使用DDNS:在家宽网络上使用DDNS可能会带来一些麻烦,可参考https://www.v2ex.com/t/799340
为什么不干脆开放全部端口:主要是考虑到安全因素
Describe alternatives you've considered
No response
Affected area
@fatedier commented on GitHub (Jun 13, 2022):
@github-actions[bot] commented on GitHub (Jul 14, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.