Eigenverft.WebLib.ClientNetwork
1.0.0.6
dotnet add package Eigenverft.WebLib.ClientNetwork --version 1.0.0.6
NuGet\Install-Package Eigenverft.WebLib.ClientNetwork -Version 1.0.0.6
<PackageReference Include="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6" />
<PackageVersion Include="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6" />
<PackageReference Include="Eigenverft.WebLib.ClientNetwork" />
paket add Eigenverft.WebLib.ClientNetwork --version 1.0.0.6
#r "nuget: Eigenverft.WebLib.ClientNetwork, 1.0.0.6"
#:package Eigenverft.WebLib.ClientNetwork@1.0.0.6
#addin nuget:?package=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6
#tool nuget:?package=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6
Eigenverft.WebLib.ClientNetwork
Collect normalized remote-peer and forwarded-IP observations for ASP.NET Core requests. It reports network facts; it does not decide which proxy or forwarded address is trusted.
✨ At a glance
| Capability | Details |
|---|---|
| Middleware | app.UseClientNetworkFeature() populates IClientNetworkFeature once per request. |
| Forwarded headers | Parses Forwarded and X-Forwarded-For, retaining source, raw token, parsed address, and malformed status. |
| Dependencies | Uses Eigenverft.NetLib.Networking and Eigenverft.WebLib.Middleware.Primitives; both are restored transitively. |
📦 Installation
dotnet add package Eigenverft.WebLib.ClientNetwork
🚀 Quick start
using Eigenverft.WebLib.ClientNetwork;
WebApplication app = builder.Build();
app.UseClientNetworkFeature();
Read context.Features.Get<IClientNetworkFeature>() downstream. The feature preserves malformed forwarded tokens and does not establish proxy trust.
Feature behavior and ordering
IClientNetworkFeature exposes RemoteIpAddress (the normalized HttpContext.Connection.RemoteIpAddress at this middleware position), ForwardedIpChain, and HasMalformedForwardedIpInformation. Missing peer IP throws InvalidOperationException. Each chain item exposes Source, RawValue, optional Address, and IsMalformed. The chain collects for= entries from Forwarded first, then X-Forwarded-For; order is preserved within each source. Parsed IP endpoints are normalized, including bracketed IPv6 with a port; IPv4-mapped IPv6 becomes IPv4. Malformed tokens are retained with no parsed address and set the malformed flags.
Treat forwarded values as untrusted until your application applies its trusted-proxy policy. Place this middleware before Forwarded Headers to record the direct peer, or after trusted Forwarded Headers to record its rewritten address. Eigenverft.WebLib.RequestTrafficLogging uses this feature for forwarded-IP log fields when enabled; the NuGet dependency is transitive.
🎯 Target frameworks
Targets net8.0 and net10.0; .NET 9 can consume the compatible net8.0 asset.
🔗 Project links
📄 License
MIT; see the repository license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Eigenverft.NetLib.Networking (>= 1.0.0.3)
- Eigenverft.WebLib.Middleware.Primitives (>= 1.0.0.5)
-
net8.0
- Eigenverft.NetLib.Networking (>= 1.0.0.3)
- Eigenverft.WebLib.Middleware.Primitives (>= 1.0.0.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Eigenverft.WebLib.ClientNetwork:
| Package | Downloads |
|---|---|
|
Eigenverft.Routed.RequestFilters
ASP.NET Core request filtering, filter-event storage, and evaluation middleware for configurable request policies. |
|
|
Eigenverft.WebLib.RequestTrafficLogging
ASP.NET Core request traffic logging middleware and HTTP logging field configuration with sensitive value controls. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial capability package extracted from Eigenverft.WebLib.Infrastructure.
- ASP.NET Core client-network middleware and forwarded client IP features backed by NetLib networking helpers.
- Public namespaces and behavior remain compatible with the original Infrastructure implementation.