mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3457] xtcp建立了连接,但好像连接又不成功 #2765
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#2765
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 @PHCSJC on GitHub (May 29, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3457
Bug Description
试了下新版本的xtcp,提示establishing nat hole connection successful,但后面又报no recent network activity,这是什么原因呢?
frpc Version
0.49.0
frps Version
0.49.0
System Architecture
linux/arm64
Configurations
服务端:
客户端1(被连接端):
客户端2(连接端):
Logs
Steps to reproduce
...
Affected area
@fatedier commented on GitHub (May 29, 2023):
ssh_visitor加上protocol = kcp,换个协议测试一下。另外,你这两个节点是在一个局域网内?对端的日志也可以发一下,另外也可以把 log_level 改成 trace,贴一下更详细的日志来分析。
@PHCSJC commented on GitHub (May 30, 2023):
@fatedier 节点不在同一个局域网,不过加了kcp确实可以了,这是为什么呢?把ssh的tcp转成udp?
@fatedier commented on GitHub (May 30, 2023):
但是你的对端 IP 显示的看起来是走的局域网。
具体原因需要抓包调试,比较复杂,默认的协议是 QUIC,可选 KCP,理论上是一样的。
@PHCSJC commented on GitHub (May 30, 2023):
知道原因了,我这2台之间有安装zerotier,所以被识别成局域网了
@PHCSJC commented on GitHub (May 30, 2023):
反馈一下效果,就不新开贴了,2个nat4节点,可以穿透成功,试了几次100%成功,在开启keep_tunnel_open = true时,ssh几乎秒连接,未开启keep_tunnel_open需要2,3秒时间连接成功
提个小建议,既然nat4成功率都这么高,能不能把xtcp和tun结合一下?这样就可以替代掉zerotier这些内网穿透的软件了
@fatedier commented on GitHub (May 30, 2023):
这个只在第一次连接时触发需要等待隧道建立的时间,后续只要网络不出异常,隧道也会一直保持,之后再建立 ssh 连接的话,也会很快。
后面会考虑的,确实之前有一些全端口映射的需求可以用这个方式来解决。
@PHCSJC commented on GitHub (Jun 2, 2023):
继续反馈一下:用ssh挂了几天,发现只要ip不变,就不会断,大佬牛逼plus
@ppl56 commented on GitHub (Oct 12, 2023):
2023/10/12 11:12:11 [W] [xtcp.go:280] [fa813de5668759ca] [p2p_rtsp_visitor] nathole prepare error: discover error: wait response from stun server timeout
2023/10/12 11:12:19 [I] [xtcp.go:283] [fa813de5668759ca] [p2p_rtsp_visitor] nathole prepare success, nat type: HardNAT, behavior: BehaviorPortChanged, addresses: [117.136.80.60:41398 117.136.80.60:17892], assistedAddresses: [192.168.1.12:61937 192.168.205.1:61937 192.168.214.1:61937 192.168.43.80:61937]
2023/10/12 11:12:21 [I] [xtcp.go:309] [fa813de5668759ca] [p2p_rtsp_visitor] get natHoleRespMsg, sid [1697080337c48449f9aff74430], protocol [quic], candidate address [223.104.242.185:7146 223.104.242.185:22356], assisted address [192.168.1.111:54979 10.0.43.205:54979 192.168.0.1:54979 192.168.184.1:54979 192.168.1.105:54979], detectBehavior: {Role:receiver Mode:1 TTL:7 SendDelayMs:0 ReadTimeoutMs:5000 CandidatePorts:[{From:22346 To:22366}] SendRandomPorts:0 ListenRandomPorts:0}
2023/10/12 11:12:21 [W] [xtcp.go:316] [fa813de5668759ca] [p2p_rtsp_visitor] make hole error: wait detect message error: read udp4 0.0.0.0:61937: wsarecvfrom: The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
2023/10/12 11:12:26 [E] [xtcp.go:179] [fa813de5668759ca] [p2p_rtsp_visitor] open tunnel error: open tunnel timeout.
我目前是这个情况。好像不太行。