StreamExtended 2.0.1
StreamExtended
Actively maintained .NET library for peeking TLS ClientHello / ServerHello (SNI, ALPN, and other extensions) from a stream before SslStream.AuthenticateAsServer / AuthenticateAsClient.
Works on Windows, Linux, and macOS (.NET 10).
Features
- Peek TLS ClientHello and ServerHello without consuming the handshake
- Read SNI, ALPN, and other hello extensions before choosing a certificate
CustomBufferedStreamimplementsIPeekStreamso peeked bytes stay available forSslStream
Code Quality
Install
dotnet add package StreamExtended
Current line: 2.0 (requires .NET 10). For net45 / netstandard1.3, stay on the 1.0.x packages.
Usage
using StreamExtended;
using StreamExtended.BufferPool;
using StreamExtended.Network;
IBufferPool bufferPool = new DefaultBufferPool();
await using var stream = new CustomBufferedStream(networkStream, bufferPool, bufferSize: 4096, leaveOpen: true);
var clientHello = await SslTools.PeekClientHello(stream, bufferPool);
if (clientHello?.Extensions != null &&
clientHello.Extensions.TryGetValue("server_name", out var sni))
{
var hostName = sni.Data;
// select certificate / continue with SslStream on the same stream
}
var serverHello = await SslTools.PeekServerHello(stream, bufferPool);
CustomBufferedStream implements IPeekStream, so peeked bytes remain available for the subsequent TLS handshake.
Supported platforms
- Windows, Linux, macOS
- .NET 10 (
net10.0)
API docs
Generated with DocFX on develop: justcoding121.github.io/stream-extended
How-to pages: GitHub Wiki.
Build
dotnet test src/StreamExtended.sln -c Release
dotnet test tests/StreamExtended.Tests/StreamExtended.Tests.csproj -c Release
dotnet test tests/StreamExtended.Integration.Tests/StreamExtended.Integration.Tests.csproj -c Release --filter TestCategory=Integration
dotnet test tests/StreamExtended.Integration.Tests/StreamExtended.Integration.Tests.csproj -c Release --filter TestCategory=E2E
dotnet pack src/StreamExtended/StreamExtended.csproj -c Release
CI runs unit, integration, and e2e on Windows (build) plus Linux and macOS (test matrix). See Building and testing.
License
MIT — see LICENSE.
Showing the top 20 packages that depend on StreamExtended.
| Packages | Downloads |
|---|---|
|
Titanium.Web.Proxy
Titanium is a light weight web proxy.
|
10 |
|
Titanium.Web.Proxy
Titanium is a light weight web proxy.
|
8 |
|
Titanium.Web.Proxy
Titanium is a light weight web proxy.
|
7 |
.NET 10.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 2.0.1 | 2 | 09/21/2026 |
| 2.0.1-beta | 1 | 09/21/2026 |
| 2.0.0 | 1 | 09/21/2026 |
| 2.0.0-beta | 2 | 09/21/2026 |
| 1.0.209-beta | 7 | 12/11/2025 |
| 1.0.206-beta | 5 | 12/17/2025 |
| 1.0.201 | 5 | 12/17/2025 |
| 1.0.200-beta | 6 | 12/17/2025 |
| 1.0.190 | 6 | 12/17/2025 |
| 1.0.188-beta | 5 | 12/17/2025 |
| 1.0.185-beta | 6 | 12/17/2025 |
| 1.0.183-beta | 7 | 12/17/2025 |
| 1.0.179 | 7 | 12/17/2025 |
| 1.0.175-beta | 5 | 12/17/2025 |
| 1.0.172-beta | 5 | 12/17/2025 |
| 1.0.170-beta | 6 | 12/17/2025 |
| 1.0.167-beta | 5 | 12/17/2025 |
| 1.0.164 | 5 | 12/17/2025 |
| 1.0.160-beta | 5 | 12/17/2025 |
| 1.0.157-beta | 8 | 12/17/2025 |
| 1.0.147-beta | 4 | 12/17/2025 |
| 1.0.144-beta | 6 | 12/17/2025 |
| 1.0.141-beta | 5 | 12/17/2025 |
| 1.0.138-beta | 7 | 12/17/2025 |
| 1.0.135-beta | 5 | 12/17/2025 |
| 1.0.132-beta | 6 | 12/17/2025 |
| 1.0.127-beta | 9 | 12/17/2025 |
| 1.0.124-beta | 5 | 12/17/2025 |
| 1.0.121-beta | 7 | 12/17/2025 |
| 1.0.118-beta | 3 | 12/17/2025 |
| 1.0.115-beta | 7 | 12/17/2025 |
| 1.0.110-beta | 6 | 12/17/2025 |
| 1.0.81 | 6 | 12/17/2025 |
| 1.0.18 | 5 | 12/17/2025 |
| 1.0.17 | 6 | 12/17/2025 |
| 1.0.13 | 8 | 12/17/2025 |