Orlys.Nautilus 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Orlys.Nautilus --version 2.0.1
                    
NuGet\Install-Package Orlys.Nautilus -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Orlys.Nautilus" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orlys.Nautilus" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Orlys.Nautilus" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Orlys.Nautilus --version 2.0.1
                    
#r "nuget: Orlys.Nautilus, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Orlys.Nautilus@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Orlys.Nautilus&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Orlys.Nautilus&version=2.0.1
                    
Install as a Cake Tool

Nautilus

alternate text is missing from this package README image
Dynamic firewall API for Windows platform written in C#.

Usage

Firewall

// required COM+ component 'NetFwTypeLib' and admin permission.
using Nautilus; 
using System.Net;

// Gets the firewall service from advance firewall rule list.
var service = Firewall.GetService("service name in fw panel"); // type: IFirewallService

// creates a new firewall rule.
var newRule = service.CreateRule(); // type: IFirewallRule
// updates firewall properties.
newRule.Enabled = true;
newRule.Direction = Directions.Incoming;
newRule.Protocol = ProtocolType.TCP;
newRule.LocalPorts.Add(8000.To(8008));
newRule.LocalPorts.Add(8009);
newRule.RemoteAddresses.Add(IPAddressRange.Parse("173.245.48.0/20"));
newRule.RemoteAddresses.Add(IPAddress.Parse("1.1.1.1"));

// commits all changes.
service.UpdateRule(newRule);

// gets the firewall rules.
var rules = service.Rules; // type: IReadOnlyCollection<IFirewallRule>

// retrieves a firewall rule.
var singleRule = service.RetrieveRule(newRule.Id);

// deletes a firewall rule.
service.DeleteRule(rule.Id);

// removes all firewall rules.
service.DropRules();

Traffics

using Nautilus; 

var families = IPAddressFamily.v4 | IPAddressFamily.v6;
var trafficRows = TcpTrafficTracker.Track(families); // type: IReadOnlyCollection<TcpTrafficRow>

License

Mozilla Public License 2.0

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 800 9/24/2021
2.0.1 437 9/24/2021
2.0.0 413 9/24/2021
1.0.2 651 5/9/2020
1.0.1 590 3/8/2020