[GH-ISSUE #3161] windows remote desktop can't connect 微软远程桌面不能连接成功 #2534

Closed
opened 2026-05-05 13:37:55 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @ocian on GitHub (Nov 6, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3161

Bug Description

I use frp in stcp type,and I tested my config by web service, and it worked well. Then I can't find which is wrong. So Could you help me ?
我使用了 frp 的 sctp 模式,并且我通过开放一个 web 服务的方式来检查我的配置,web 服务可以访问,但是微软远程桌面的连接是失败的,可以帮帮我吗?

I noticed the connection is two part, one is get a certificate file, and next is connect. The part on is fine, but the next is failed.
我注意到微软远程桌面的连接是分为两个步骤的,先是要获取到证书文件,同意之后才是连接。证书文件获取是没有问题的,连接的这一步骤失败了。

My English is poor, so wish I could use mother tongue, Chinese.

frpc Version

0.45.0

frps Version

0.45.0

System Architecture

linux/amd64 + windows/amd64 + darwin/arm64

Configurations

cloud server 云服务器:

[common]
bind_port = 9528

log_file = /path/to/frp_0.45.0_linux_amd64/frps.log	

be visited computer 被访问的电脑:

[common]
server_addr = _IP of cloud server 云服务器的IP地址_
server_port = 9528
#tls_enable = true

[rdp]
type = stcp
# 只有 sk 一致的用户才能访问到此服务
sk = abcdefg
local_ip = 127.0.0.1
local_port = 3389
#remote_port = 10080

visitor computed 远程访问的电脑:

[common]
server_addr = _IP of cloud server 云服务器的IP地址_
server_port = 9528
#tls_enable = true

[rdp_visitor]
type = stcp
# stcp 的访问者
role = visitor
# 要访问的 stcp 代理的名字
server_name = rdp
sk = abcdefg
# 绑定本地端口用于访问 SSH 服务
bind_addr = 127.0.0.1
bind_port = 3389

Logs

2022/11/06 05:45:36 [I] [root.go:206] frps uses config file: /home/lighthouse/frp_0.45.0_linux_amd64/frps.ini
2022/11/06 05:45:36 [I] [service.go:196] frps tcp listen on 0.0.0.0:9528
2022/11/06 05:45:36 [I] [root.go:215] frps started successfully
2022/11/06 05:45:36 [I] [service.go:454] [75e1dd81e01ab799] client login info: ip [101.86.128.132:56923] version [0.45.0] hostname [] os [windows] arch [amd64]
2022/11/06 05:45:36 [I] [stcp.go:34] [75e1dd81e01ab799] [rdp] stcp proxy custom listen success
2022/11/06 05:45:36 [I] [control.go:464] [75e1dd81e01ab799] new proxy [rdp] type [stcp] success
2022/11/06 05:45:37 [I] [service.go:454] [4fc2c3497a436ea5] client login info: ip [101.86.128.132:56924] version [0.45.0] hostname [] os [darwin] arch [arm64]
2022/11/06 05:46:25 [I] [proxy.go:179] [75e1dd81e01ab799] [rdp] get a user connection [101.86.128.132:56924]
2022/11/06 05:46:26 [I] [proxy.go:179] [75e1dd81e01ab799] [rdp] get a user connection [101.86.128.132:56924]
2022/11/06 05:46:56 [I] [control.go:306] [75e1dd81e01ab799] control writer is closing
2022/11/06 05:46:56 [I] [proxy.go:88] [75e1dd81e01ab799] [rdp] proxy closing
2022/11/06 05:46:56 [I] [control.go:395] [75e1dd81e01ab799] client exit success
2022/11/06 05:46:56 [W] [proxy.go:176] [75e1dd81e01ab799] [rdp] listener is closed: listener closed
2022/11/06 05:46:57 [I] [service.go:454] [c230f023745b7896] client login info: ip [101.86.128.132:56938] version [0.45.0] hostname [] os [windows] arch [amd64]
2022/11/06 05:46:57 [I] [stcp.go:34] [c230f023745b7896] [rdp] stcp proxy custom listen success
2022/11/06 05:46:57 [I] [control.go:464] [c230f023745b7896] new proxy [rdp] type [stcp] success
2022/11/06 05:54:37 [I] [control.go:306] [4fc2c3497a436ea5] control writer is closing
2022/11/06 05:54:37 [I] [control.go:395] [4fc2c3497a436ea5] client exit success
2022/11/06 15:16:04 [I] [service.go:454] [e21a9d4e92bca9f7] client login info: ip [101.86.128.132:57043] version [0.45.0] hostname [] os [darwin] arch [arm64]
2022/11/06 15:16:10 [I] [proxy.go:179] [c230f023745b7896] [rdp] get a user connection [101.86.128.132:57043]
2022/11/06 15:16:11 [I] [proxy.go:179] [c230f023745b7896] [rdp] get a user connection [101.86.128.132:57043]
2022/11/06 15:16:29 [I] [control.go:306] [c230f023745b7896] control writer is closing
2022/11/06 15:16:29 [I] [proxy.go:88] [c230f023745b7896] [rdp] proxy closing
2022/11/06 15:16:29 [I] [control.go:395] [c230f023745b7896] client exit success
2022/11/06 15:16:29 [W] [proxy.go:176] [c230f023745b7896] [rdp] listener is closed: listener closed
2022/11/06 15:16:30 [I] [service.go:454] [c483104e6691450a] client login info: ip [101.86.128.132:57047] version [0.45.0] hostname [] os [windows] arch [amd64]
2022/11/06 15:16:30 [I] [stcp.go:34] [c483104e6691450a] [rdp] stcp proxy custom listen success
2022/11/06 15:16:30 [I] [control.go:464] [c483104e6691450a] new proxy [rdp] type [stcp] success
2022/11/06 15:16:34 [I] [control.go:306] [e21a9d4e92bca9f7] control writer is closing
2022/11/06 15:16:34 [I] [control.go:395] [e21a9d4e92bca9f7] client exit success
2022/11/06 15:16:35 [I] [service.go:454] [39d7bdc35151eb26] client login info: ip [101.86.128.132:57051] version [0.45.0] hostname [] os [darwin] arch [arm64]
2022/11/06 15:16:42 [I] [proxy.go:179] [c483104e6691450a] [rdp] get a user connection [101.86.128.132:57051]
2022/11/06 15:16:43 [I] [proxy.go:179] [c483104e6691450a] [rdp] get a user connection [101.86.128.132:57051]
2022/11/06 15:17:07 [I] [control.go:306] [c483104e6691450a] control writer is closing
2022/11/06 15:17:07 [I] [proxy.go:88] [c483104e6691450a] [rdp] proxy closing
2022/11/06 15:17:07 [I] [control.go:395] [c483104e6691450a] client exit success
2022/11/06 15:17:07 [W] [proxy.go:176] [c483104e6691450a] [rdp] listener is closed: listener closed
2022/11/06 15:17:09 [I] [service.go:454] [f15db103217797da] client login info: ip [101.86.128.132:57059] version [0.45.0] hostname [] os [windows] arch [amd64]
2022/11/06 15:17:09 [I] [stcp.go:34] [f15db103217797da] [rdp] stcp proxy custom listen success
2022/11/06 15:17:09 [I] [control.go:464] [f15db103217797da] new proxy [rdp] type [stcp] success
2022/11/06 15:17:13 [I] [control.go:306] [39d7bdc35151eb26] control writer is closing
2022/11/06 15:17:13 [I] [control.go:395] [39d7bdc35151eb26] client exit success
2022/11/06 15:17:14 [I] [service.go:454] [8513be3ed2468e6e] client login info: ip [101.86.128.132:57060] version [0.45.0] hostname [] os [darwin] arch [arm64]
2022/11/06 15:17:20 [I] [proxy.go:179] [f15db103217797da] [rdp] get a user connection [101.86.128.132:57060]
2022/11/06 15:17:23 [I] [proxy.go:179] [f15db103217797da] [rdp] get a user connection [101.86.128.132:57060]
2022/11/06 15:48:16 [I] [control.go:306] [8513be3ed2468e6e] control writer is closing
2022/11/06 15:48:16 [I] [control.go:395] [8513be3ed2468e6e] client exit success

Steps to reproduce

  1. Download linux/amd64 frp to colud server, add config and run it. 下载 linux/amd64 的 frp 到云服务器,添加配置之后运行
  2. Download windows/amd64 frp to windows computer, add config and run it. 下载 windows/amd64 的 frp 到 windows 的电脑,添加配置然后运行
  3. Download darwin/arm64 frp to arm mac computer, add config and run it. 下载 darwin/arm64 到 m1 mac 电脑,添加配置然后运行
  4. Under mac computer, connect windows computer using Microsoft Remote Desktop under Intranet IP. It's worked. 在 m1 mac 电脑上,用局域网 IP 和微软远程桌面连接 windows 电脑,可以正常工作。
  5. Change Intranet IP to Internet IP, It connect failed. The part of get certificate file successed, and the next part of connect is failed. 把局域网 IP 修改成国内服务器的 IP,连接就失败了。连接过程里面的第一步获取证书是成功的,接下来的连接就失败了。
  6. Change windows port from the 3389 of windows rdp to the 80 of http, it worked. 把 windows 电脑配置的端口号,从微软远程桌面使用的 3389 ,切换到 web 用的 80,他是可以成功访问的。

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @ocian on GitHub (Nov 6, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3161 ### Bug Description I use frp in stcp type,and I tested my config by web service, and it worked well. Then I can't find which is wrong. So Could you help me ? 我使用了 frp 的 sctp 模式,并且我通过开放一个 web 服务的方式来检查我的配置,web 服务可以访问,但是微软远程桌面的连接是失败的,可以帮帮我吗? I noticed the connection is two part, one is get a certificate file, and next is connect. The part on is fine, but the next is failed. 我注意到微软远程桌面的连接是分为两个步骤的,先是要获取到证书文件,同意之后才是连接。证书文件获取是没有问题的,连接的这一步骤失败了。 My English is poor, so wish I could use mother tongue, Chinese. ### frpc Version 0.45.0 ### frps Version 0.45.0 ### System Architecture linux/amd64 + windows/amd64 + darwin/arm64 ### Configurations cloud server 云服务器: ```ini [common] bind_port = 9528 log_file = /path/to/frp_0.45.0_linux_amd64/frps.log ``` be visited computer 被访问的电脑: ```ini [common] server_addr = _IP of cloud server 云服务器的IP地址_ server_port = 9528 #tls_enable = true [rdp] type = stcp # 只有 sk 一致的用户才能访问到此服务 sk = abcdefg local_ip = 127.0.0.1 local_port = 3389 #remote_port = 10080 ``` visitor computed 远程访问的电脑: ```ini [common] server_addr = _IP of cloud server 云服务器的IP地址_ server_port = 9528 #tls_enable = true [rdp_visitor] type = stcp # stcp 的访问者 role = visitor # 要访问的 stcp 代理的名字 server_name = rdp sk = abcdefg # 绑定本地端口用于访问 SSH 服务 bind_addr = 127.0.0.1 bind_port = 3389 ``` ### Logs 2022/11/06 05:45:36 [I] [root.go:206] frps uses config file: /home/lighthouse/frp_0.45.0_linux_amd64/frps.ini 2022/11/06 05:45:36 [I] [service.go:196] frps tcp listen on 0.0.0.0:9528 2022/11/06 05:45:36 [I] [root.go:215] frps started successfully 2022/11/06 05:45:36 [I] [service.go:454] [75e1dd81e01ab799] client login info: ip [101.86.128.132:56923] version [0.45.0] hostname [] os [windows] arch [amd64] 2022/11/06 05:45:36 [I] [stcp.go:34] [75e1dd81e01ab799] [rdp] stcp proxy custom listen success 2022/11/06 05:45:36 [I] [control.go:464] [75e1dd81e01ab799] new proxy [rdp] type [stcp] success 2022/11/06 05:45:37 [I] [service.go:454] [4fc2c3497a436ea5] client login info: ip [101.86.128.132:56924] version [0.45.0] hostname [] os [darwin] arch [arm64] 2022/11/06 05:46:25 [I] [proxy.go:179] [75e1dd81e01ab799] [rdp] get a user connection [101.86.128.132:56924] 2022/11/06 05:46:26 [I] [proxy.go:179] [75e1dd81e01ab799] [rdp] get a user connection [101.86.128.132:56924] 2022/11/06 05:46:56 [I] [control.go:306] [75e1dd81e01ab799] control writer is closing 2022/11/06 05:46:56 [I] [proxy.go:88] [75e1dd81e01ab799] [rdp] proxy closing 2022/11/06 05:46:56 [I] [control.go:395] [75e1dd81e01ab799] client exit success 2022/11/06 05:46:56 [W] [proxy.go:176] [75e1dd81e01ab799] [rdp] listener is closed: listener closed 2022/11/06 05:46:57 [I] [service.go:454] [c230f023745b7896] client login info: ip [101.86.128.132:56938] version [0.45.0] hostname [] os [windows] arch [amd64] 2022/11/06 05:46:57 [I] [stcp.go:34] [c230f023745b7896] [rdp] stcp proxy custom listen success 2022/11/06 05:46:57 [I] [control.go:464] [c230f023745b7896] new proxy [rdp] type [stcp] success 2022/11/06 05:54:37 [I] [control.go:306] [4fc2c3497a436ea5] control writer is closing 2022/11/06 05:54:37 [I] [control.go:395] [4fc2c3497a436ea5] client exit success 2022/11/06 15:16:04 [I] [service.go:454] [e21a9d4e92bca9f7] client login info: ip [101.86.128.132:57043] version [0.45.0] hostname [] os [darwin] arch [arm64] 2022/11/06 15:16:10 [I] [proxy.go:179] [c230f023745b7896] [rdp] get a user connection [101.86.128.132:57043] 2022/11/06 15:16:11 [I] [proxy.go:179] [c230f023745b7896] [rdp] get a user connection [101.86.128.132:57043] 2022/11/06 15:16:29 [I] [control.go:306] [c230f023745b7896] control writer is closing 2022/11/06 15:16:29 [I] [proxy.go:88] [c230f023745b7896] [rdp] proxy closing 2022/11/06 15:16:29 [I] [control.go:395] [c230f023745b7896] client exit success 2022/11/06 15:16:29 [W] [proxy.go:176] [c230f023745b7896] [rdp] listener is closed: listener closed 2022/11/06 15:16:30 [I] [service.go:454] [c483104e6691450a] client login info: ip [101.86.128.132:57047] version [0.45.0] hostname [] os [windows] arch [amd64] 2022/11/06 15:16:30 [I] [stcp.go:34] [c483104e6691450a] [rdp] stcp proxy custom listen success 2022/11/06 15:16:30 [I] [control.go:464] [c483104e6691450a] new proxy [rdp] type [stcp] success 2022/11/06 15:16:34 [I] [control.go:306] [e21a9d4e92bca9f7] control writer is closing 2022/11/06 15:16:34 [I] [control.go:395] [e21a9d4e92bca9f7] client exit success 2022/11/06 15:16:35 [I] [service.go:454] [39d7bdc35151eb26] client login info: ip [101.86.128.132:57051] version [0.45.0] hostname [] os [darwin] arch [arm64] 2022/11/06 15:16:42 [I] [proxy.go:179] [c483104e6691450a] [rdp] get a user connection [101.86.128.132:57051] 2022/11/06 15:16:43 [I] [proxy.go:179] [c483104e6691450a] [rdp] get a user connection [101.86.128.132:57051] 2022/11/06 15:17:07 [I] [control.go:306] [c483104e6691450a] control writer is closing 2022/11/06 15:17:07 [I] [proxy.go:88] [c483104e6691450a] [rdp] proxy closing 2022/11/06 15:17:07 [I] [control.go:395] [c483104e6691450a] client exit success 2022/11/06 15:17:07 [W] [proxy.go:176] [c483104e6691450a] [rdp] listener is closed: listener closed 2022/11/06 15:17:09 [I] [service.go:454] [f15db103217797da] client login info: ip [101.86.128.132:57059] version [0.45.0] hostname [] os [windows] arch [amd64] 2022/11/06 15:17:09 [I] [stcp.go:34] [f15db103217797da] [rdp] stcp proxy custom listen success 2022/11/06 15:17:09 [I] [control.go:464] [f15db103217797da] new proxy [rdp] type [stcp] success 2022/11/06 15:17:13 [I] [control.go:306] [39d7bdc35151eb26] control writer is closing 2022/11/06 15:17:13 [I] [control.go:395] [39d7bdc35151eb26] client exit success 2022/11/06 15:17:14 [I] [service.go:454] [8513be3ed2468e6e] client login info: ip [101.86.128.132:57060] version [0.45.0] hostname [] os [darwin] arch [arm64] 2022/11/06 15:17:20 [I] [proxy.go:179] [f15db103217797da] [rdp] get a user connection [101.86.128.132:57060] 2022/11/06 15:17:23 [I] [proxy.go:179] [f15db103217797da] [rdp] get a user connection [101.86.128.132:57060] 2022/11/06 15:48:16 [I] [control.go:306] [8513be3ed2468e6e] control writer is closing 2022/11/06 15:48:16 [I] [control.go:395] [8513be3ed2468e6e] client exit success ### Steps to reproduce 1. Download linux/amd64 frp to colud server, add config and run it. 下载 linux/amd64 的 frp 到云服务器,添加配置之后运行 2. Download windows/amd64 frp to windows computer, add config and run it. 下载 windows/amd64 的 frp 到 windows 的电脑,添加配置然后运行 3. Download darwin/arm64 frp to arm mac computer, add config and run it. 下载 darwin/arm64 到 m1 mac 电脑,添加配置然后运行 4. Under mac computer, connect windows computer using Microsoft Remote Desktop under Intranet IP. It's worked. 在 m1 mac 电脑上,用局域网 IP 和微软远程桌面连接 windows 电脑,可以正常工作。 5. Change Intranet IP to Internet IP, It connect failed. The part of get certificate file successed, and the next part of connect is failed. 把局域网 IP 修改成国内服务器的 IP,连接就失败了。连接过程里面的第一步获取证书是成功的,接下来的连接就失败了。 6. Change windows port from the 3389 of windows rdp to the 80 of http, it worked. 把 windows 电脑配置的端口号,从微软远程桌面使用的 3389 ,切换到 web 用的 80,他是可以成功访问的。 ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:37:55 -06:00
Author
Owner

@fatedier commented on GitHub (Nov 7, 2022):

映射的具体的服务的问题,需要自己排查原因以及提出解决方案。因为项目维护者是不可能有精力去尝试和逐一研究各种其他服务的实现原理的。

<!-- gh-comment-id:1305008039 --> @fatedier commented on GitHub (Nov 7, 2022): 映射的具体的服务的问题,需要自己排查原因以及提出解决方案。因为项目维护者是不可能有精力去尝试和逐一研究各种其他服务的实现原理的。
Author
Owner

@ahmr-bot-old commented on GitHub (Nov 13, 2022):

STCP 类型的穿透服务器端还需要 增加
bind_udp_port = 端口
这样的一条配置的

<!-- gh-comment-id:1312654321 --> @ahmr-bot-old commented on GitHub (Nov 13, 2022): STCP 类型的穿透服务器端还需要 增加 bind_udp_port = 端口 这样的一条配置的
Author
Owner

@ocian commented on GitHub (Nov 13, 2022):

STCP 类型的穿透服务器端还需要 增加 bind_udp_port = 端口 这样的一条配置的

这个是好的,我的问题解决了,谢谢你 ^-^

<!-- gh-comment-id:1312728264 --> @ocian commented on GitHub (Nov 13, 2022): > STCP 类型的穿透服务器端还需要 增加 bind_udp_port = 端口 这样的一条配置的 这个是好的,我的问题解决了,谢谢你 ^-^
Author
Owner

@github-actions[bot] commented on GitHub (Dec 14, 2022):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1350176279 --> @github-actions[bot] commented on GitHub (Dec 14, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@LeonYew-Ley commented on GitHub (Nov 28, 2023):

STCP 类型的穿透服务器端还需要 增加 bind_udp_port = 端口 这样的一条配置的

这个是好的,我的问题解决了,谢谢你 ^-^

请问怎么解决的可以分享一下吗

<!-- gh-comment-id:1829694001 --> @LeonYew-Ley commented on GitHub (Nov 28, 2023): > > STCP 类型的穿透服务器端还需要 增加 bind_udp_port = 端口 这样的一条配置的 > > 这个是好的,我的问题解决了,谢谢你 ^-^ 请问怎么解决的可以分享一下吗
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#2534
No description provided.