Eigenverft.WebLib.ClientNetwork
1.0.0.6-g40a2f17cdc
dotnet add package Eigenverft.WebLib.ClientNetwork --version 1.0.0.6-g40a2f17cdc
NuGet\Install-Package Eigenverft.WebLib.ClientNetwork -Version 1.0.0.6-g40a2f17cdc
<PackageReference Include="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6-g40a2f17cdc" />
<PackageVersion Include="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6-g40a2f17cdc" />
<PackageReference Include="Eigenverft.WebLib.ClientNetwork" />
paket add Eigenverft.WebLib.ClientNetwork --version 1.0.0.6-g40a2f17cdc
#r "nuget: Eigenverft.WebLib.ClientNetwork, 1.0.0.6-g40a2f17cdc"
#:package Eigenverft.WebLib.ClientNetwork@1.0.0.6-g40a2f17cdc
#addin nuget:?package=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6-g40a2f17cdc&prerelease
#tool nuget:?package=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6-g40a2f17cdc&prerelease
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-g40a2f17cdc)
-
net8.0
- Eigenverft.NetLib.Networking (>= 1.0.0.3)
- Eigenverft.WebLib.Middleware.Primitives (>= 1.0.0.5-g40a2f17cdc)
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0.6-g40a2f17cdc | 0 | 9/28/2026 |
| 1.0.0.6-g3f72d1412c | 0 | 9/29/2026 |
| 1.0.0.3-gbfce1c5596 | 0 | 9/28/2026 |
| 1.0.0.3-g8afd56e9dc | 0 | 9/12/2026 |
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.