From b58bfebcf3bcdcde4f06a183f92eb3e01842d270 Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Fri, 13 Jun 2025 10:18:11 +0400 Subject: [PATCH] fix: disable UDP connections on windows-rdp module (#149) ## Description Relates to Fixes an issue where RDP doesn't function properly over Coder Connect, by disabling UDP and relying only on TCP. c.f. https://github.com/coder/internal/issues/608#issuecomment-2965923672 for a detailed description of the problem. --- ## Type of Change - [ ] New module - [X] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other --- ## Module Information **Path:** `registry/coder/modules/windows-rdp` **New version:** `v1.0.19` **Breaking change:** [ ] Yes [x] No --- ## Testing & Validation - [x] Tests pass (`bun test`) - [x] Code formatted (`bun run fmt`) - [x] Changes tested locally --- ## Related Issues https://github.com/coder/internal/issues/608 Closes # --------- Signed-off-by: Spike Curtis --- registry/coder/modules/windows-rdp/README.md | 8 ++++---- .../windows-rdp/powershell-installation-script.tftpl | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/registry/coder/modules/windows-rdp/README.md b/registry/coder/modules/windows-rdp/README.md index cad96407..0899a79a 100644 --- a/registry/coder/modules/windows-rdp/README.md +++ b/registry/coder/modules/windows-rdp/README.md @@ -16,7 +16,7 @@ Enable Remote Desktop + a web based client on Windows workspaces, powered by [de module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.2.0" + version = "1.2.1" agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -34,7 +34,7 @@ module "windows_rdp" { module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.2.0" + version = "1.2.1" agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -46,7 +46,7 @@ module "windows_rdp" { module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.2.0" + version = "1.2.1" agent_id = resource.coder_agent.main.id resource_id = resource.google_compute_instance.dev[0].id } @@ -58,7 +58,7 @@ module "windows_rdp" { module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.2.0" + version = "1.2.1" agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id devolutions_gateway_version = "2025.1.6" # Specify a specific version diff --git a/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl b/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl index c3053584..27c45b45 100644 --- a/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl +++ b/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl @@ -16,6 +16,11 @@ function Configure-RDP { New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "SecurityLayer" -Value 1 -PropertyType DWORD -Force # Enable RDP through Windows Firewall Enable-NetFirewallRule -DisplayGroup "Remote Desktop" + + # Disable UDP. It doesn't work via `coder port-forward` and is broken due to MTU issues in Coder Connect. + # Requires a restart to take effect. c.f. https://github.com/coder/internal/issues/608#issuecomment-2965923672 + New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name "SelectTransport" -Value 1 -PropertyType DWORD -Force + Restart-Service -Name "TermService" -Force } function Install-DevolutionsGateway {