RestrictIp.Plugin 5.7.0

dotnet add package RestrictIp.Plugin --version 5.7.0
                    
NuGet\Install-Package RestrictIp.Plugin -Version 5.7.0
                    
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="RestrictIp.Plugin" Version="5.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RestrictIp.Plugin" Version="5.7.0" />
                    
Directory.Packages.props
<PackageReference Include="RestrictIp.Plugin" />
                    
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 RestrictIp.Plugin --version 5.7.0
                    
#r "nuget: RestrictIp.Plugin, 5.7.0"
                    
#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.
#addin nuget:?package=RestrictIp.Plugin&version=5.7.0
                    
Install RestrictIp.Plugin as a Cake Addin
#tool nuget:?package=RestrictIp.Plugin&version=5.7.0
                    
Install RestrictIp.Plugin as a Cake Tool

This package is one of many packages that can be used with Plugin Manager which can be used to extend any c#/.net based application (MVC, Winform, WPF, MAUI etc) by using a Modular Approach.

Restrict Ip Plugin

The RestrictIp plugin modules allows individual routes, or a collection of roots to be restricted to a specific range of Ip Addresses. This can be useful for instance if you wnat to ensure that only connections from an internal Ip range are allowed into specific routes, for instance staff only areas.

It achieves this by adding an instance of the RestrictedIpRouteAttribute to a controller. The RestrictedIpRoute attribute takes a single parameter which is the name of the profile which controls what Ip addresses are allowed to enter the route. RestrictIpSettings class contains the configuration data and is read from appsettings.json.

The following code sample demonstrates how the attribute is added to a route with a profile name of RestrictedRouteRemote


[ApiController]
[RestrictedIpRoute("RestrictedRouteRemote")]
[Route("/api/Restricted/")]
public class RestrictedRouteController : ControllerBase
{
    [HttpGet]
    public string About()
    {
        return ("Test");
    }
}

The following sample shows the appsettings.json with the restricted route settings:


"RestrictedIpRoutes.Plugin": {
  "Disabled": false,
  "RouteRestrictions": {
    "RestrictedRouteAllowAll": "*",
    "RestrictedRouteLocal": "localhost",
    "RestrictedRouteRemote": "10.30.*;192.168.*",
    "SystemAdminRoute": "127.0.0.1;72.15.*"
  }
}

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on RestrictIp.Plugin:

Package Downloads
ShoppingCartPlugin

Plugin Manager Shopping cart plugin for managing users checkout experience

SystemAdmin.Plugin

Plugin Manager display and manage system behaviours

Company.Plugin

Plugin Manager add generic company information to any website

ErrorManager.Plugin

Plugin Manager easily manage errors within a website

UserAccount.Plugin

Plugin Manager user account plugin

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.7.0 272 12/20/2024
5.6.1 393 6/12/2024
5.6.0 941 12/1/2023
5.5.2 663 11/25/2023
5.5.1 821 10/12/2023
5.5.0 730 10/9/2023
5.4.0 1,020 9/2/2023
5.3.0 915 7/30/2023
5.1.0 1,130 6/11/2023
5.0.3 2,864 11/24/2022
5.0.0 3,053 11/13/2022
4.4.0 4,932 4/22/2022
4.3.0 3,399 10/27/2021
4.2.0 3,331 8/3/2021
4.1.0 2,863 2/7/2021
4.0.0 3,218 10/6/2020
3.3.0 3,320 4/10/2020
3.2.0 3,197 1/9/2020
3.0.1 3,095 12/1/2019
3.0.0 3,057 10/13/2019
2.5.0 3,053 9/7/2019
2.4.0 3,114 7/25/2019
2.3.0 3,093 6/27/2019
2.2.0 2,829 6/15/2019
2.1.0 2,861 5/3/2019
2.0.0 2,431 4/7/2019
1.7.0 938 3/31/2019
1.6.0 769 2/23/2019
1.5.0 829 2/16/2019
1.4.0 810 2/4/2019
1.3.0 797 1/26/2019
1.2.0 860 1/6/2019
1.1.0 791 12/21/2018
1.0.14 1,645 11/12/2018
1.0.12 1,604 11/1/2018

Supports net 6.0, net8.0 and net9.0