Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The xtcp connection is down #4232

Closed
11 tasks
wuai1024 opened this issue May 21, 2024 · 6 comments
Closed
11 tasks

The xtcp connection is down #4232

wuai1024 opened this issue May 21, 2024 · 6 comments

Comments

@wuai1024
Copy link

Describe the feature request

2024-05-21 17:27:58.704 [I] [sub/root.go:142] start frpc service for config file [frpc.yaml]
2024-05-21 17:27:58.705 [I] [client/service.go:294] try to connect to server...
2024-05-21 17:27:58.812 [I] [client/service.go:286] [5c289ba45db687ca] login to server success, get run id [5c289ba45db687ca]
2024-05-21 17:27:58.813 [I] [visitor/visitor_manager.go:121] [5c289ba45db687ca] start visitor success
2024-05-21 17:27:58.813 [I] [visitor/visitor_manager.go:172] [5c289ba45db687ca] visitor added: [mac-temp.ssh]
2024-05-21 17:27:59.330 [I] [visitor/xtcp.go:283] [5c289ba45db687ca] [mac-temp.ssh] nathole prepare success, nat type: HardNAT, behavior: BehaviorIPChanged, addresses: [103.155.100.145:6807 103.155.100.146:6807], assistedAddresses: [192.168.7.104:54777]
2024-05-21 17:28:02.003 [I] [visitor/xtcp.go:309] [5c289ba45db687ca] [mac-temp.ssh] get natHoleRespMsg, sid [1716283678f6538625a86f4f00], protocol [kcp], candidate address [45.140.88.18:34306 45.140.88.18:49620], assisted address [192.168.1.24:44500 172.18.0.1:44500 172.17.0.1:44500], detectBehavior: {Role:sender Mode:0 TTL:0 SendDelayMs:0 ReadTimeoutMs:5000 CandidatePorts:[] SendRandomPorts:0 ListenRandomPorts:0}
2024-05-21 17:28:07.005 [W] [visitor/xtcp.go:316] [5c289ba45db687ca] [mac-temp.ssh] make hole error: wait detect message error: read udp4 0.0.0.0:54777: i/o timeout

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
@xqzr
Copy link

xqzr commented May 21, 2024

nat type: HardNAT

可能 ISP 将 NAT 类型更改为更严格的

@wuai1024
Copy link
Author

我的是全锥型网络

@fatedier
Copy link
Owner

分类为 HardNAT ,无法穿透属于正常现象,文档中已经说明可用性和稳定性无法保证,在需要可靠连接的情况下,建议使用 STCP 替代。

建议可以多次尝试,以及配置 keepTunnelOpen = true 自动重试,如果还是不行建议放弃。

@wuai1024
Copy link
Author

提供端 frpc 日志

2024-05-22 14:43:51.279 [I] [proxy/xtcp.go:72] [bb07b93ee913cc78] [ikuai.ssh-xtcp] nathole prepare success, nat type: EasyNAT, behavior: BehaviorNoChange, addresses: [117.143.124.254:9392 117.143.124.254:9392], assistedAddresses: [192.168.253.3:35594]
2024-05-22 14:43:52.290 [I] [proxy/xtcp.go:93] [bb07b93ee913cc78] [ikuai.ssh-xtcp] get natHoleRespMsg, sid [1716360230ec3bb64dfc6c37f9], protocol [kcp], candidate address [103.155.100.136:3750 103.155.100.135:3750], assisted address [192.168.6.166:58597], detectBehavior: {Role:sender Mode:2 TTL:0 SendDelayMs:3000 ReadTimeoutMs:35000 CandidatePorts:[] SendRandomPorts:1000 ListenRandomPorts:0}

访问端frpc日志:

2024-05-22 14:44:31.090 [I] [visitor/xtcp.go:283] [6cae7aba85645393] [mac-temp.ssh] nathole prepare success, nat type: HardNAT, behavior: BehaviorIPChanged, addresses: [103.155.100.148:62382 103.155.100.147:62382], assistedAddresses: [192.168.6.166:60626]
2024-05-22 14:44:31.929 [I] [visitor/xtcp.go:309] [6cae7aba85645393] [mac-temp.ssh] get natHoleRespMsg, sid [17163602708250f12fa9b2a3d2], protocol [kcp], candidate address [117.143.124.254:9457], assisted address [192.168.253.3:45388], detectBehavior: {Role:receiver Mode:2 TTL:7 SendDelayMs:0 ReadTimeoutMs:38000 CandidatePorts:[] SendRandomPorts:0 ListenRandomPorts:256}
2024-05-22 14:44:50.521 [E] [visitor/xtcp.go:179] [6cae7aba85645393] [mac-temp.ssh] open tunnel error: open tunnel timeout
2024-05-22 14:45:07.861 [W] [visitor/xtcp.go:146] [6cae7aba85645393] [mac-temp.ssh] keepTunnelOpenWorker get tunnel connection error: no tunnel session
2024-05-22 14:45:09.955 [W] [visitor/xtcp.go:316] [6cae7aba85645393] [mac-temp.ssh] make hole error: wait detect message timeout

@wuai1024
Copy link
Author

目前是一端为 NAT1 ,一端为 NAT4

@wuai1024
Copy link
Author

已成功了,谢谢大佬 @fatedier

@xqzr xqzr mentioned this issue May 28, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants