From 7cd12f151c3a486be690907ce860a634a75fcc8a Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 2 Aug 2023 10:28:34 +0800 Subject: [PATCH] it seems firewall has no dir=inout, change to two rule for safety --- src/platform/windows.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 029cbac01..1a0ce6711 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -954,7 +954,8 @@ fn get_after_install(exe: &str) -> String { reg add HKEY_CLASSES_ROOT\\{ext}\\shell\\open /f reg add HKEY_CLASSES_ROOT\\{ext}\\shell\\open\\command /f reg add HKEY_CLASSES_ROOT\\{ext}\\shell\\open\\command /f /ve /t REG_SZ /d \"\\\"{exe}\\\" \\\"%%1\\\"\" - netsh advfirewall firewall add rule name=\"{app_name} Service\" dir=inout action=allow program=\"{exe}\" enable=yes + netsh advfirewall firewall add rule name=\"{app_name} Service\" dir=out action=allow program=\"{exe}\" enable=yes + netsh advfirewall firewall add rule name=\"{app_name} Service\" dir=in action=allow program=\"{exe}\" enable=yes {create_service} reg add HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /f /v SoftwareSASGeneration /t REG_DWORD /d 1 ", create_service=get_create_service(&exe))