Merge pull request #321 from sitiom/firewall-rules

Add batch files to add and remove firewall rules
This commit is contained in:
ReenigneArcher 2022-08-17 13:50:13 -04:00 committed by GitHub
commit 53bd9ea82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,8 @@
@echo off
set RULE_NAME=Sunshine
set PROGRAM_BIN="%~dp0sunshine.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

View File

@ -0,0 +1,6 @@
@echo off
set RULE_NAME=Sunshine
rem Delete the rule
netsh advfirewall firewall delete rule name=%RULE_NAME%