Eigenverft.WebLib.ClientNetwork 1.0.0.6-g3f72d1412c

This is a prerelease version of Eigenverft.WebLib.ClientNetwork.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Eigenverft.WebLib.ClientNetwork --version 1.0.0.6-g3f72d1412c
                    
NuGet\Install-Package Eigenverft.WebLib.ClientNetwork -Version 1.0.0.6-g3f72d1412c
                    
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="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6-g3f72d1412c" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eigenverft.WebLib.ClientNetwork" Version="1.0.0.6-g3f72d1412c" />
                    
Directory.Packages.props
<PackageReference Include="Eigenverft.WebLib.ClientNetwork" />
                    
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 Eigenverft.WebLib.ClientNetwork --version 1.0.0.6-g3f72d1412c
                    
#r "nuget: Eigenverft.WebLib.ClientNetwork, 1.0.0.6-g3f72d1412c"
                    
#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 Eigenverft.WebLib.ClientNetwork@1.0.0.6-g3f72d1412c
                    
#: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=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6-g3f72d1412c&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Eigenverft.WebLib.ClientNetwork&version=1.0.0.6-g3f72d1412c&prerelease
                    
Install as a Cake Tool

Eigenverft.WebLib.ClientNetwork

NuGet Version NuGet Downloads Repository CI Targets License

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.

📄 License

MIT; see the repository license.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.