-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from atc-net/feature/vNext1
Feature/v next1
- Loading branch information
Showing
88 changed files
with
4,826 additions
and
807 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// ReSharper disable CheckNamespace | ||
namespace Atc.Installer.Integration; | ||
|
||
public enum FirewallDirectionType | ||
{ | ||
Inbound, | ||
Outbound, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// ReSharper disable CheckNamespace | ||
namespace Atc.Installer.Integration; | ||
|
||
public enum FirewallProtocolType | ||
{ | ||
Any, | ||
Tcp, | ||
Udp, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
namespace Atc.Installer.Integration; | ||
|
||
public interface IWindowsFirewallService | ||
{ | ||
bool DoesRuleExist( | ||
string ruleName); | ||
|
||
bool IsRuleEnabled( | ||
string ruleName); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddInboundRuleForAllowTcp( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddInboundRuleForAllowUdp( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddInboundRuleForAllowAny( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddOutboundRuleForAllowTcp( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddOutboundRuleForAllowUdp( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) AddOutboundRuleForAllowAny( | ||
string ruleName, | ||
string description, | ||
int port); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) EnableRule( | ||
string ruleName); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) DisableRule( | ||
string ruleName); | ||
|
||
(bool IsSucceeded, string? ErrorMessage) RemoveRule( | ||
string ruleName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Atc.Installer.Integration/InstallationConfigurations/FirewallRuleOption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Atc.Installer.Integration.InstallationConfigurations; | ||
|
||
public class FirewallRuleOption | ||
{ | ||
public string Name { get; set; } = string.Empty; | ||
|
||
public int Port { get; set; } | ||
|
||
public FirewallProtocolType Protocol { get; set; } = FirewallProtocolType.Tcp; | ||
|
||
public FirewallDirectionType Direction { get; set; } = FirewallDirectionType.Inbound; | ||
|
||
public override string ToString() | ||
=> $"{nameof(Name)}: {Name}, {nameof(Port)}: {Port}, {nameof(Protocol)}: {Protocol}, {nameof(Direction)}: {Direction}"; | ||
} |
Oops, something went wrong.