RestrictIp.Plugin
5.7.0
dotnet add package RestrictIp.Plugin --version 5.7.0
NuGet\Install-Package RestrictIp.Plugin -Version 5.7.0
<PackageReference Include="RestrictIp.Plugin" Version="5.7.0" />
paket add RestrictIp.Plugin --version 5.7.0
#r "nuget: RestrictIp.Plugin, 5.7.0"
// Install RestrictIp.Plugin as a Cake Addin #addin nuget:?package=RestrictIp.Plugin&version=5.7.0 // Install RestrictIp.Plugin as a Cake Tool #tool nuget:?package=RestrictIp.Plugin&version=5.7.0
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 | Versions 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. |
-
net6.0
- ApplicationSettings (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0)
- PluginManager (>= 5.7.0)
- SharedPluginFeatures (>= 5.7.0)
-
net8.0
- ApplicationSettings (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0)
- PluginManager (>= 5.7.0)
- SharedPluginFeatures (>= 5.7.0)
-
net9.0
- ApplicationSettings (>= 2.3.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 9.0.0)
- PluginManager (>= 5.7.0)
- SharedPluginFeatures (>= 5.7.0)
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 | 241 | 12/20/2024 |
5.6.1 | 389 | 6/12/2024 |
5.6.0 | 936 | 12/1/2023 |
5.5.2 | 660 | 11/25/2023 |
5.5.1 | 819 | 10/12/2023 |
5.5.0 | 729 | 10/9/2023 |
5.4.0 | 1,019 | 9/2/2023 |
5.3.0 | 906 | 7/30/2023 |
5.1.0 | 1,124 | 6/11/2023 |
5.0.3 | 2,855 | 11/24/2022 |
5.0.0 | 3,043 | 11/13/2022 |
4.4.0 | 4,919 | 4/22/2022 |
4.3.0 | 3,381 | 10/27/2021 |
4.2.0 | 3,313 | 8/3/2021 |
4.1.0 | 2,837 | 2/7/2021 |
4.0.0 | 3,192 | 10/6/2020 |
3.3.0 | 3,292 | 4/10/2020 |
3.2.0 | 3,170 | 1/9/2020 |
3.0.1 | 3,067 | 12/1/2019 |
3.0.0 | 3,026 | 10/13/2019 |
2.5.0 | 3,023 | 9/7/2019 |
2.4.0 | 3,082 | 7/25/2019 |
2.3.0 | 3,060 | 6/27/2019 |
2.2.0 | 2,800 | 6/15/2019 |
2.1.0 | 2,830 | 5/3/2019 |
2.0.0 | 2,399 | 4/7/2019 |
1.7.0 | 907 | 3/31/2019 |
1.6.0 | 735 | 2/23/2019 |
1.5.0 | 797 | 2/16/2019 |
1.4.0 | 778 | 2/4/2019 |
1.3.0 | 763 | 1/26/2019 |
1.2.0 | 825 | 1/6/2019 |
1.1.0 | 757 | 12/21/2018 |
1.0.14 | 1,603 | 11/12/2018 |
1.0.12 | 1,561 | 11/1/2018 |
Supports net 6.0, net8.0 and net9.0