it seems firewall has no dir=inout, change to two rule for safety

This commit is contained in:
rustdesk 2023-08-02 10:28:34 +08:00
parent e148cc7e51
commit 7cd12f151c

View File

@ -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))