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

XTCP fails on windows #4245

Open
2 of 11 tasks
Jerry12228 opened this issue May 27, 2024 · 4 comments
Open
2 of 11 tasks

XTCP fails on windows #4245

Jerry12228 opened this issue May 27, 2024 · 4 comments
Labels

Comments

@Jerry12228
Copy link

Bug Description

日志如下(最先是使用quic协议失败, 以下是更改kcp后依然失败)

2024-05-27 10:40:12.583 [I] [sub/root.go:142] start frpc service for config file [.\frpc.json]
2024-05-27 10:40:12.603 [I] [client/service.go:294] try to connect to server...
2024-05-27 10:40:13.362 [I] [client/service.go:286] [06484294096b4d28] login to server success, get run id [06484294096b4d28]
2024-05-27 10:40:13.374 [I] [visitor/visitor_manager.go:121] [06484294096b4d28] start visitor success
2024-05-27 10:40:13.374 [I] [visitor/visitor_manager.go:172] [06484294096b4d28] visitor added: [RDP1S-p2p]
2024-05-27 10:40:14.338 [I] [visitor/xtcp.go:283] [06484294096b4d28] [RDP1S-p2p] nathole prepare success, nat type: EasyNAT, behavior: BehaviorNoChange, addresses: [202.201.94.50:65270 202.201.94.50:65270], assistedAddresses: [192.168.137.1:65270 10.20.3.70:65270]
2024-05-27 10:40:16.446 [I] [visitor/xtcp.go:309] [06484294096b4d28] [RDP1S-p2p] get natHoleRespMsg, sid [1716777614a681494b5c7abe58], protocol [kcp], candidate address [116.176.114.25:5716], assisted address [192.168.31.204:33902 172.17.0.1:33902 172.19.0.1:33902 192.168.49.1:33902 172.18.0.1:33902], detectBehavior: {Role:sender Mode:0 TTL:0 SendDelayMs:0 ReadTimeoutMs:5000 CandidatePorts:[] SendRandomPorts:0 ListenRandomPorts:0}
2024-05-27 10:40:16.484 [W] [visitor/xtcp.go:316] [06484294096b4d28] [RDP1S-p2p] make hole error: wait detect message error: read udp4 0.0.0.0:65270: wsarecvfrom: The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.

frpc Version

0.58.0

frps Version

0.58.0

System Architecture

[visitor]windows/amd64, [client]linux/arm64, [server]linux/amd64

Configurations

{
    "serverAddr": "",
    "serverPort": 7000,
    "loginFailExit": false,
    "natHoleStunServer": "stun.easyvoip.com:3478",
    "auth": {
        "method": "token",
        "token": ""
    },

    "log": {
         "to": "log.log"
    },

    "visitors": [
        {
            "name": "RDP1S-p2p",
            "type": "xtcp",
            "serverName": "RDP1S-p2p",
            "secretKey": "",
            "bindADdr": "localhost",
            "bindPort": 13389,

            "keepTunnelOpen": true,
            "protocol": "kcp"
        }
    ]
}

Logs

日志如上文提及

Steps to reproduce

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 28, 2024

多连几次
#4232 (comment)

如果打洞失败,可以尝试多次建立连接,程序会尝试其他的打洞策略,有可能在多次重试后成功打洞。

https://gofrp.org/zh-cn/docs/features/xtcp/

@fatedier
Copy link
Owner

看上去像是 windows 环境下的特殊问题,quic-go repo 下有一个相关的 issue quic-go/quic-go#1737

我缺乏复现环境,不是很好测试。

@fatedier fatedier changed the title XTCP 失败 XTCP fails on windows May 29, 2024
@Jerry12228
Copy link
Author

看上去像是 windows 环境下的特殊问题,quic-go repo 下有一个相关的 issue quic-go/quic-go#1737

我缺乏复现环境,不是很好测试。

Windows 所处网络环境是校园网

我应该如何测试(由于使用的是学校的多媒体所以时间不是很充分, 我能做到的大概就是拿编译好的exe运行以下然后收集日志)?

quic失败日志:

024-05-24 20:09:58.874 [I] [sub/root.go:142] start frpc service for config file [.\frpc.json]
2024-05-24 20:09:58.891 [I] [client/service.go:294] try to connect to server...
2024-05-24 20:10:00.606 [I] [client/service.go:286] [e597d4a1d7bbeea2] login to server success, get run id [e597d4a1d7bbeea2]
2024-05-24 20:10:00.619 [I] [visitor/visitor_manager.go:121] [e597d4a1d7bbeea2] start visitor success
2024-05-24 20:10:00.619 [I] [visitor/visitor_manager.go:172] [e597d4a1d7bbeea2] visitor added: [RDP1S-p2p]
2024-05-24 20:10:32.511 [I] [visitor/xtcp.go:283] [e597d4a1d7bbeea2] [RDP1S-p2p] nathole prepare success, nat type: EasyNAT, behavior: BehaviorNoChange, addresses: [202.201.94.50:58952 202.201.94.50:58952], assistedAddresses: [192.168.137.1:58952 10.20.3.70:58952]
2024-05-24 20:10:34.845 [I] [visitor/xtcp.go:309] [e597d4a1d7bbeea2] [RDP1S-p2p] get natHoleRespMsg, sid [17165526321c552c2bbee79327], protocol [quic], candidate address [116.176.114.25:5519], assisted address [192.168.31.204:53364 172.17.0.1:53364 172.19.0.1:53364 192.168.49.1:53364 172.18.0.1:53364], detectBehavior: {Role:sender Mode:0 TTL:0 SendDelayMs:0 ReadTimeoutMs:5000 CandidatePorts:[] SendRandomPorts:0 ListenRandomPorts:0}
2024-05-24 20:10:34.861 [W] [visitor/xtcp.go:316] [e597d4a1d7bbeea2] [RDP1S-p2p] make hole error: wait detect message error: read udp4 0.0.0.0:58952: wsarecvfrom: The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.

@coreshowfun
Copy link

建议检测NAT类型,如果是对称型NAT,打洞成功率极低极低,端口要随机匹配上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants