[GH-ISSUE #588] 【求助】P2P连接实验不成功,我哪里错了? #458

Closed
opened 2026-05-05 12:17:45 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @BI7PRK on GitHub (Jan 4, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/588

What version of frp are you using (./frpc -v or ./frps -v)?

v0.14.1

What operating system and processor architecture are you using (go env)?

Server

CentOS 6.9 (Final) 32bit

Client

Windows && linux [x64]

Steps to reproduce the issue:

P2P 连接实验不成功

Describe the results you received:

frpc.log

type = xtcp

2018/01/04 21:59:30 [I] [control.go:446] [79b8c6bb1beac1ee] try to start visitor [p2p_ssh_visitor]
2018/01/04 21:59:30 [I] [control.go:454] [p2p_ssh_visitor] start visitor success
2018/01/04 21:59:42 [W] [visitor.go:224] [p2p_ssh_visitor] get natHoleRespMsg error: read udp 192.168.31.9:57580->104.**.**.11:7**1: i/o timeout

type = stcp

2018/01/04 20:42:56 [W] [visitor.go:139] [p2p_ssh_visitor] start new visitor connection error: custom listener for [p2p_proxy] doesn't exist

对端配置:

[p2p_ssh]
type = xtcp  # 切换 stcp 其它项不变
sk = 123456
role = server
local_ip = 192.168.31.100
local_port = 22
use_encryption = false
use_compression = false

请求端配置:

[p2p_ssh_visitor]
type = xtcp  # 切换 stcp 其它项不变
sk = 123456
role = visitor
server_name = p2p_proxy
bind_addr = 127.0.0.1
bind_port = 220

SSH 连接:127.0.0.1:220,连接失败后frpc输出日志结果。

Originally created by @BI7PRK on GitHub (Jan 4, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/588 **What version of frp are you using (./frpc -v or ./frps -v)?** # v0.14.1 # **What operating system and processor architecture are you using (`go env`)?** **Server** ### CentOS 6.9 (Final) 32bit ### **Client** ### Windows && linux [x64] ### **Steps to reproduce the issue:** # P2P 连接实验不成功 # **Describe the results you received:** ## frpc.log ## #### type = xtcp #### ``` 2018/01/04 21:59:30 [I] [control.go:446] [79b8c6bb1beac1ee] try to start visitor [p2p_ssh_visitor] 2018/01/04 21:59:30 [I] [control.go:454] [p2p_ssh_visitor] start visitor success 2018/01/04 21:59:42 [W] [visitor.go:224] [p2p_ssh_visitor] get natHoleRespMsg error: read udp 192.168.31.9:57580->104.**.**.11:7**1: i/o timeout ``` #### type = stcp #### ``` 2018/01/04 20:42:56 [W] [visitor.go:139] [p2p_ssh_visitor] start new visitor connection error: custom listener for [p2p_proxy] doesn't exist ``` **对端配置:** ``` [p2p_ssh] type = xtcp # 切换 stcp 其它项不变 sk = 123456 role = server local_ip = 192.168.31.100 local_port = 22 use_encryption = false use_compression = false ``` **请求端配置:** ``` [p2p_ssh_visitor] type = xtcp # 切换 stcp 其它项不变 sk = 123456 role = visitor server_name = p2p_proxy bind_addr = 127.0.0.1 bind_port = 220 ``` SSH 连接:127.0.0.1:220,连接失败后frpc输出日志结果。
Author
Owner

@fatedier commented on GitHub (Jan 17, 2018):

server_name 不是 p2p_proxy 而是 p2p_ssh,日志里已经有提示了。

且 p2p 模式只是一个初期版本,目前本身成功率就不是很高,如果无法连接,说明网络环境不支持,就不用再尝试了。

<!-- gh-comment-id:358346046 --> @fatedier commented on GitHub (Jan 17, 2018): server_name 不是 `p2p_proxy` 而是 `p2p_ssh`,日志里已经有提示了。 且 p2p 模式只是一个初期版本,目前本身成功率就不是很高,如果无法连接,说明网络环境不支持,就不用再尝试了。
Author
Owner

@dolphin93 commented on GitHub (Jan 29, 2018):

就我的使用来说,使用xtcp方式连接内网的远程桌面,全部成功,效果也非常好,唯一的问题,可能就是udp超时问题,如果一段时间没有操作,就断了连接,需要重连

<!-- gh-comment-id:361225942 --> @dolphin93 commented on GitHub (Jan 29, 2018): 就我的使用来说,使用xtcp方式连接内网的远程桌面,全部成功,效果也非常好,唯一的问题,可能就是udp超时问题,如果一段时间没有操作,就断了连接,需要重连
Author
Owner

@hongnod commented on GitHub (Apr 11, 2018):

和seafile搭配使用,seafile server在移动宽带,seafile client在公司内网(通过http代理上公网),配置xtcp显示连接成功,但传输数据时就显示超时,无法传送。

<!-- gh-comment-id:380300922 --> @hongnod commented on GitHub (Apr 11, 2018): 和seafile搭配使用,seafile server在移动宽带,seafile client在公司内网(通过http代理上公网),配置xtcp显示连接成功,但传输数据时就显示超时,无法传送。
Author
Owner

@aaroneva43 commented on GitHub (Aug 8, 2018):

我使用xtcp连接远程桌面正常, 但是过段时间bind_udp_port 就会失效 需要重新指定, 不知道什么原因, vps商的限制?

<!-- gh-comment-id:411316758 --> @aaroneva43 commented on GitHub (Aug 8, 2018): 我使用xtcp连接远程桌面正常, 但是过段时间bind_udp_port 就会失效 需要重新指定, 不知道什么原因, vps商的限制?
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#458
No description provided.