Skip to content

Commit

Permalink
Merge pull request #321 from sitiom/firewall-rules
Browse files Browse the repository at this point in the history
Add batch files to add and remove firewall rules
  • Loading branch information
ReenigneArcher authored Aug 17, 2022
2 parents ccd568a + adeb99f commit 53bd9ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src_assets/windows/misc/firewall/add-firewall-rule.bat
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions src_assets/windows/misc/firewall/delete-firewall-rule.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

set RULE_NAME=Sunshine

rem Delete the rule
netsh advfirewall firewall delete rule name=%RULE_NAME%

0 comments on commit 53bd9ea

Please sign in to comment.