mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3510] 使用xtcp时,启用use_compression会导致连接出问题? #2805
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#2805
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 @zlm324 on GitHub (Jun 30, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3510
Bug Description
两台机器配置文件见下文,在B机器上启动frpc.exe后,提示“[ServiceA-xtcp-visitor] establishing nat hole connection successful”,但使用RDP连接A机器会提示“无法连接,错误代码0x907,补充代码0x7”。
在A机器配置文件的[ServiceA-xtcp]段将"use_compression = true“一行删掉,故障解除。
此外,如果单使用stcp,即使使用”use_compression = true“,功能也正常。
不清楚这是我使用不当还是bug,请诸位指教,感谢。
frpc Version
0.50.0
frps Version
0.50.0
System Architecture
windows/amd64
Configurations
A机器:
Windows 11,22631
[ServiceA-stcp]
type = stcp
sk = <>
local_ip = 127.0.0.1
local_port = 3389
use_compression = true
[SeviceA-xtcp]
type = xtcp
sk = <>
local_ip = 127.0.0.1
local_port = 3389
use_compression = true
B机器:
Windows 11,22621
[ServiceA-stcp-visitor]
type = stcp
role = visitor
server_name = ServiceA-stcp
bind_port = -1
[ServiceA-xtcp-visitor]
type = xtcp
role = visitor
server_name = ServiceA-xtcp
bind_addr = 127.0.0.1
bind_port = 3390
fallback_to = ServiceA-stcp-visitor
fallback_timeout_ms = 2000
keep_tunnel_open = true
Logs
No response
Steps to reproduce
...
Affected area
@zlm324 commented on GitHub (Jun 30, 2023):
我搞清楚了,use_compression = true,要求在A和B配置文件中同时存在,只一边有不行。
@zlm324 commented on GitHub (Jun 30, 2023):
我又测试了一下,stcp协议真的不需要双边加”use_compression = true",单边有就可以正常连接,至于加密功能是否生效我不清楚。所以在xtcp中必须双边配置,这算是个bug吗?
@fatedier commented on GitHub (Jun 30, 2023):
stcp 和 xtcp 的机制不一样,所以行为上会有一些不同。
stcp 是两个 frpc 都先连接 frps,加密和压缩都是 frpc 和 frps 之间的事情,是独立的,所以你的配置仅作用于单边的 frpc 和 frps。frpc 会事先把是否要加密和压缩通知 frps,所以 frps 能正确处理。
xtcp 是两个 frpc 直接通信,要压缩就需要两边都开启,不存在单边开启的情况。
use_encryption通常不建议使用,因为现在默认会启用 TLS 加密,不需要再重复加密。@zlm324 commented on GitHub (Jun 30, 2023):
非常感谢!!