EgressPool.DependencyInjection 26.6.13.9164

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

EgressPool

A .NET library for sending outbound TCP, UDP, and HTTP traffic from a pool of source IP addresses. Outbound connections appear from different local addresses while the calling code stays simple.

Features

  • Configure IPv4 or IPv6 prefixes, or auto-detect them from local interfaces.
  • Create TCP, UDP, or HTTP clients bound to addresses from those prefixes.
  • Select prefixes by destination scope.
  • Release addresses by disposing clients, sockets, leases, or the pool itself.

Quick Start

using Egress;

await using EgressPool pool = await EgressPool.CreateAsync();
using HttpClient client = pool.CreateHttpClient();

string response = await client.GetStringAsync("http://127.0.0.1:5000/");

Dependency Injection

Install EgressPool.DependencyInjection and register with your service collection:

builder.Services.AddEgressPool();
builder.Services.AddHttpClient("egress").UseEgressPool();

Running in Containers

Containers need host networking, root access, and the NET_ADMIN capability so the pool can bind to and configure host interfaces.

docker run --network host --user root --cap-add NET_ADMIN your-image

Docker Compose equivalent:

services:
  app:
    image: your-image
    network_mode: host
    user: root
    cap_add:
      - NET_ADMIN

Expected Behavior

Each outbound connection uses a source address from the pool. Disposing the connection, client, or pool releases the address.

Some configurations require elevated permissions. If unavailable, pool or connection creation throws an exception.

Product Compatible and additional computed target framework versions.
.NET 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.6.13.9164 222 6/13/2026
26.6.13.4405 209 6/13/2026
26.6.13.3376 226 6/13/2026
26.6.9.3431 135 6/9/2026
26.6.9.3234 97 6/9/2026
26.6.8.9942 122 6/8/2026
26.6.8.9815 98 6/8/2026
26.6.8.9706 90 6/8/2026
26.6.8.9476 102 6/8/2026
26.6.8.9180 105 6/8/2026
26.6.8.9091 90 6/8/2026
26.6.8.9060 99 6/8/2026
26.6.8.7209 92 6/8/2026
26.6.8.7122 95 6/8/2026