Sunshine/src_assets/windows/misc/firewall/add-firewall-rule.bat

12 lines
424 B
Batchfile
Raw Normal View History

@echo off
2022-08-28 19:51:17 +00:00
rem Get sunshine root directory
for %%I in ("%~dp0\..") do set "ROOT_DIR=%%~fI"
set RULE_NAME=Sunshine
2022-08-28 19:51:17 +00:00
set PROGRAM_BIN="%ROOT_DIR%\sunshine.exe"
rem Add the rule
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=tcp program=%PROGRAM_BIN% enable=yes
netsh advfirewall firewall add rule name=%RULE_NAME% dir=in action=allow protocol=udp program=%PROGRAM_BIN% enable=yes