[GH-ISSUE #4735] windows rdp udp和tcp 无法同时连接 #3741

Closed
opened 2026-05-05 14:23:47 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @Masttf on GitHub (Mar 30, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4735

Bug Description

配置了stcp和sudp 然后远程连接,但是只走tcp

frpc Version

0.61.2

frps Version

0.61.2

System Architecture

linux/amd64, windows/amd64

Configurations

这是frps.toml

bindPort = 7000
auth.method = "token"
auth.token = "*"
log.to = "./frps.log"
log.level = "info"
log.maxDays = 3
transport.maxPoolCount = 2

这是frpc.toml

serverAddr = "*"
serverPort = 7000
auth.method = "token"
auth.token = "*"
loginFailExit = false

[[proxies]]
name = "stcp_rdp"
type = "stcp"
localPort = 3389
localIP = "127.0.0.1"
secretKey = "*"
transport.useCompression = true

[[proxies]]
name = "sudp_rdp"
type = "sudp"
localPort = 3389
localIP = "127.0.0.1"
secretKey = "*"
transport.useCompression = true

[[proxies]]
name = "xtcp_rdp"
type = "xtcp"
localPort = 3389
localIP = "127.0.0.1"
secretKey = "*"
transport.useCompression = true

这是visitor frpc.toml

serverAddr = "*"
serverPort = 7000
auth.method = "token"
auth.token = "*"
loginFailExit = false

[[visitors]]
name = "stcp-rdp-visitor"
type = "stcp"
serverName = "stcp_rdp"
secretKey = "*"
bindAddr = "127.0.0.1"
bindPort = -1
transport.useCompression = true

[[visitors]]
name = "sudp-rdp-visitor"
type = "sudp"
serverName = "sudp_rdp"
secretKey = "*"
bindAddr = "127.0.0.1"
bindPort = 23389
transport.useCompression = true

[[visitors]]
name = "xtcp-rdp-visitor"
type = "xtcp"
serverName = "xtcp_rdp"
secretKey = "*"
bindAddr = "127.0.0.1"
bindPort = 23389
transport.useCompression = true
keepTunnelOpen = true
fallbackTo = "stcp-rdp-visitor"
fallbackTimeoutMs = 2000

我想在xtcp连接失败后fallbackto stcp连接,但是这样走的是tcp,我以为是xtcp的问题后来我去掉xtcp只尝试stcp和sudp并设置同一端口,走的还是tcp协议

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @Masttf on GitHub (Mar 30, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4735 ### Bug Description 配置了stcp和sudp 然后远程连接,但是只走tcp ### frpc Version 0.61.2 ### frps Version 0.61.2 ### System Architecture linux/amd64, windows/amd64 ### Configurations 这是frps.toml ``` bindPort = 7000 auth.method = "token" auth.token = "*" log.to = "./frps.log" log.level = "info" log.maxDays = 3 transport.maxPoolCount = 2 ``` 这是frpc.toml ``` serverAddr = "*" serverPort = 7000 auth.method = "token" auth.token = "*" loginFailExit = false [[proxies]] name = "stcp_rdp" type = "stcp" localPort = 3389 localIP = "127.0.0.1" secretKey = "*" transport.useCompression = true [[proxies]] name = "sudp_rdp" type = "sudp" localPort = 3389 localIP = "127.0.0.1" secretKey = "*" transport.useCompression = true [[proxies]] name = "xtcp_rdp" type = "xtcp" localPort = 3389 localIP = "127.0.0.1" secretKey = "*" transport.useCompression = true ``` 这是visitor frpc.toml ``` serverAddr = "*" serverPort = 7000 auth.method = "token" auth.token = "*" loginFailExit = false [[visitors]] name = "stcp-rdp-visitor" type = "stcp" serverName = "stcp_rdp" secretKey = "*" bindAddr = "127.0.0.1" bindPort = -1 transport.useCompression = true [[visitors]] name = "sudp-rdp-visitor" type = "sudp" serverName = "sudp_rdp" secretKey = "*" bindAddr = "127.0.0.1" bindPort = 23389 transport.useCompression = true [[visitors]] name = "xtcp-rdp-visitor" type = "xtcp" serverName = "xtcp_rdp" secretKey = "*" bindAddr = "127.0.0.1" bindPort = 23389 transport.useCompression = true keepTunnelOpen = true fallbackTo = "stcp-rdp-visitor" fallbackTimeoutMs = 2000 ``` 我想在xtcp连接失败后fallbackto stcp连接,但是这样走的是tcp,我以为是xtcp的问题后来我去掉xtcp只尝试stcp和sudp并设置同一端口,走的还是tcp协议 ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [x] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [x] Others
Author
Owner

@superzjg commented on GitHub (Mar 31, 2025):

貌似是这样的,我用stcp也测了,sudp无效。
不过rdp用stcp配合quic也用起来挺快(比我开启了udp的vpn要快)

<!-- gh-comment-id:2765407161 --> @superzjg commented on GitHub (Mar 31, 2025): 貌似是这样的,我用stcp也测了,sudp无效。 不过rdp用stcp配合quic也用起来挺快(比我开启了udp的vpn要快)
Author
Owner

@xqzr commented on GitHub (Apr 4, 2025):

如果被连接端是 24H2 安装最新 KB

<!-- gh-comment-id:2778260517 --> @xqzr commented on GitHub (Apr 4, 2025): 如果**被连接**端是 24H2 安装最新 KB
Author
Owner

@Masttf commented on GitHub (Apr 4, 2025):

如果被连接端是 24H2 安装最新 KB

我的是23H2

<!-- gh-comment-id:2778296541 --> @Masttf commented on GitHub (Apr 4, 2025): > 如果**被连接**端是 24H2 安装最新 KB 我的是23H2
Author
Owner

@Masttf commented on GitHub (Apr 4, 2025):

貌似是这样的,我用stcp也测了,sudp无效。 不过rdp用stcp配合quic也用起来挺快(比我开启了udp的vpn要快)

你是怎么配置的,方便分享一下嘛, 我在服务端添加了quic协议端口quicBindPort = 7000,在客户端添加了transport.protocol = "quic",直接连不上frp了

<!-- gh-comment-id:2778672968 --> @Masttf commented on GitHub (Apr 4, 2025): > 貌似是这样的,我用stcp也测了,sudp无效。 不过rdp用stcp配合quic也用起来挺快(比我开启了udp的vpn要快) 你是怎么配置的,方便分享一下嘛, 我在服务端添加了quic协议端口quicBindPort = 7000,在客户端添加了transport.protocol = "quic",直接连不上frp了
Author
Owner

@xqzr commented on GitHub (Apr 4, 2025):

在客户端添加了transport.protocol = "quic",直接连不上frp了

因此怀疑 frps 所在网络,没有接受 UDP

<!-- gh-comment-id:2778785366 --> @xqzr commented on GitHub (Apr 4, 2025): > 在客户端添加了transport.protocol = "quic",直接连不上frp了 因此怀疑 frps 所在网络,没有接受 UDP
Author
Owner

@Masttf commented on GitHub (Apr 4, 2025):

在客户端添加了transport.protocol = "quic",直接连不上frp了

因此怀疑 frps 所在网络,没有接受 UDP

你说的对,我忘记了打开阿里云安全组,谢谢你 @xqzr

<!-- gh-comment-id:2778818348 --> @Masttf commented on GitHub (Apr 4, 2025): > > 在客户端添加了transport.protocol = "quic",直接连不上frp了 > > 因此怀疑 frps 所在网络,没有接受 UDP 你说的对,我忘记了打开阿里云安全组,谢谢你 @xqzr
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#3741
No description provided.