Commit e70aea7c authored by Sparkf's avatar Sparkf 🏙️ Committed by GitHub
Browse files

Merge pull request #53 from BadBoyGuangzhi/master

完善并更新关于远程桌面的内容
parents 04b50661 62a5ed42
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]
"PortNumber"=dword:0000fff2

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"PortNumber"=dword:0000fff2

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]
"{4043AE3F-5762-46B6-A755-23E34F020290}"="v2.30|Action=Allow|Active=TRUE|Dir=In|Protocol=17|LPort=13389|Name=RDP-13389-UDP|"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]
"{8A4F4940-93E0-4BFC-B35F-2C89A6AD260F}"="v2.30|Action=Allow|Active=TRUE|Dir=In|Protocol=6|LPort=13389|Name=RDP-13389-TCP|"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DisableCAD"=dword:00000001
+28 −1
Original line number Diff line number Diff line
@@ -33,10 +33,37 @@ by [@jerrylususu](https://github.com/jerrylususu)
## 服务端配置

1. [开启「远程桌面」功能。](https://support.microsoft.com/zh-cn/windows/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2-5fe128d5-8fb1-7a23-3b8a-41e636865e8c)(此功能需要专业版本 Windows,家庭版本可以使用 GitHub 上的开源工具 [RDPWrap](https://github.com/stascorp/rdpwrap) 开启此功能,[教程](https://www.iplaysoft.com/rdp-wrapper-library.html))。注:若按照教程仍然无法开启功能,则可能是服务端‘rdpwrap.ini’文件与当前Windows版本不匹配,可以从 Github 的 Issues 或其他地方获取 rdpwrap 文件并替换。详情可参考此[B站视频演示](https://b23.tv/TTaRTD)
2. [设置远程桌面端口为非 3389 端口](https://docs.microsoft.com/zh-cn/windows-server/remote/remote-desktop-services/clients/change-listening-port) ,并记住这个端口号(此为信息中心的限制,为防止病毒通过远程桌面传播,默认阻断了 3389 端口上的 TCP 链接)
2. [设置远程桌面端口为非 3389 端口](https://docs.microsoft.com/zh-cn/windows-server/remote/remote-desktop-services/clients/change-listening-port) ,并记住这个端口号~~(此为信息中心的限制,为防止病毒通过远程桌面传播,默认阻断了 3389 端口上的 TCP 链接)~~,此限制实测在工学院和慧园地区已取消,其他地区待认证。
3. 查看并记录自己的 IP 地址:打开「任务管理器」,切换到「性能」标签页,在左侧找到「Wi-Fi」,在右侧找到「IPv4 地址」并记录。(通常为以小数点分割的一组数字,如 `10.XX.XX.XX`
4. (非必需设置)如果想从非校园网络访问远程设备,可以尝试使用 [ZeroTier One](https://www.zerotier.com/) 等软件[配置内网穿透](https://b23.tv/MzHzMi)功能。

### 一键开启远程桌面功能并修改端口为13389的注册表文件:
by [@BadBoyGuangzhi](https://github.com/BadBoyGuangzhi)

打开记事本,复制下方文本到记事本内,另存为 ``xxx.reg`` 文件,右键管理员运行即可(已经开启过的也可以使用此文件修改端口为13389,不会重复添加导致冲突)。或者也可以直接使用成品 [点我下载成品](https://raw.githubusercontent.com/SUSTC/sustech-online-ng/master/docs/files/rdp-13389.reg)

```
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]
"PortNumber"=dword:0000fff2

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"PortNumber"=dword:0000fff2

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]
"{4043AE3F-5762-46B6-A755-23E34F020290}"="v2.30|Action=Allow|Active=TRUE|Dir=In|Protocol=17|LPort=13389|Name=RDP-13389-UDP|"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]
"{8A4F4940-93E0-4BFC-B35F-2C89A6AD260F}"="v2.30|Action=Allow|Active=TRUE|Dir=In|Protocol=6|LPort=13389|Name=RDP-13389-TCP|"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DisableCAD"=dword:00000001
```

## 从客户端连接

1. 在「开始」菜单中选择「Windows 附件 / 远程桌面」(或使用 `Win+R` 打开「运行」窗口,然后输入 `mstsc`,按下回车)