[GH-ISSUE #3824] [Feature Request] xtcp fallback stcp,当P2P NAT穿透成功后能否切换回P2P通道 #3039

Closed
opened 2026-05-05 13:57:58 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @ldjking on GitHub (Dec 2, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3824

Describe the feature request

wget http://127.0.0.1:9001/44GB.iso
在visitor处下载一个较大的文件做测试。
服务提供者分别构造3种场景:

  1. 断开xtcp, 保留stcp 通道 观察到能正常下载
  2. 恢复xtcp, 保留stcp 通道 未发现速度有提升,判断没有发生切换
  3. 保留xtcp, 断开stcp 通道 发现速度提升,判断切换回p2p通道
  4. 保留xtcp, 恢复stcp 通道 速度无变化
  5. 断开xtcp, 保留stcp 通道 速度快速降为0,但是等待一段时间后,又恢复下载了。
    我想请教一下目前这里面支持优先使用p2p通道吗?在p2p建立成功后,切换回p2p通道?

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 @ldjking on GitHub (Dec 2, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3824 ### Describe the feature request wget http://127.0.0.1:9001/44GB.iso 在visitor处下载一个较大的文件做测试。 服务提供者分别构造3种场景: 1. 断开xtcp, 保留stcp 通道 观察到能正常下载 2. 恢复xtcp, 保留stcp 通道 未发现速度有提升,判断没有发生切换 3. 保留xtcp, 断开stcp 通道 发现速度提升,判断切换回p2p通道 4. 保留xtcp, 恢复stcp 通道 速度无变化 5. 断开xtcp, 保留stcp 通道 速度快速降为0,但是等待一段时间后,又恢复下载了。 我想请教一下目前这里面支持优先使用p2p通道吗?在p2p建立成功后,切换回p2p通道? ### Describe alternatives you've considered _No response_ ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:57:58 -06:00
Author
Owner

@ldjking commented on GitHub (Dec 4, 2023):

目前我是这样处理的,xtcp不再指定fallback 独立两个进程9000 stcp 9001 xtcp,然后由nginx 9002做负载均衡,
upstream sla {
server 127.0.0.1:9001;
server 127.0.0.1:9000 backup;
}

9001健康检查通过时关闭9000端口上的进程。

<!-- gh-comment-id:1837886297 --> @ldjking commented on GitHub (Dec 4, 2023): 目前我是这样处理的,xtcp不再指定fallback 独立两个进程9000 stcp 9001 xtcp,然后由nginx 9002做负载均衡, upstream sla { server 127.0.0.1:9001; server 127.0.0.1:9000 backup; } 9001健康检查通过时关闭9000端口上的进程。
Author
Owner

@fatedier commented on GitHub (Dec 4, 2023):

完全看不懂

<!-- gh-comment-id:1837922459 --> @fatedier commented on GitHub (Dec 4, 2023): 完全看不懂
Author
Owner

@ldjking commented on GitHub (Dec 6, 2023):

是这样的,P2P连接需要耗时做NAT穿透,几秒到十分钟都有可能,先做了一个stcp的中继通道使用,等P2P连接建立起来再关闭掉中继通道。xtcp的fallback到stcp目前应该是不能再fallforward回到P2P通道上。我目前用nginx 管理9001 9000端口,再用monit监视9001成功后关闭9000端口上的stcp中继通道。

<!-- gh-comment-id:1841941382 --> @ldjking commented on GitHub (Dec 6, 2023): 是这样的,P2P连接需要耗时做NAT穿透,几秒到十分钟都有可能,先做了一个stcp的中继通道使用,等P2P连接建立起来再关闭掉中继通道。xtcp的fallback到stcp目前应该是不能再fallforward回到P2P通道上。我目前用nginx 管理9001 9000端口,再用monit监视9001成功后关闭9000端口上的stcp中继通道。
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2024):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1879459505 --> @github-actions[bot] commented on GitHub (Jan 6, 2024): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3039
No description provided.