StreamExtended 2.0.0

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

StreamExtended

Actively maintained .NET library for peeking TLS ClientHello / ServerHello (SNI, ALPN, and other extensions) from a stream before SslStream.AuthenticateAsServer / AuthenticateAsClient.

Build NuGet NuGet downloads

Code Quality

Quality Gate Coverage Lines of Code Bugs Vulnerabilities Code Smells Security Rating Reliability Rating Maintainability Rating Duplicated Lines Technical Debt

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 frameworks

  • .NET 10 (net10.0)

API docs

Generated with DocFX on develop: justcoding121.github.io/stream-extended

Build

dotnet test src/StreamExtended.sln -c Release
dotnet pack src/StreamExtended/StreamExtended.csproj -c Release

License

MIT — see LICENSE.

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.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on StreamExtended:

Package Downloads
CitadelCore

Transparent filtering HTTP/S and Websocket/WebsocketSecure proxy.

Titanium.Web.Proxy.Fork-WithSshFix

Titanium is a light weight web proxy. This unofficial fork contains a fix for better handling SSH connections, so that it can be used to proxy SSH.NET connections.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on StreamExtended:

Repository Stars
pengw0048/NeteaseReverseLadder
Play your favorite songs in Netease Cloud Music that are banned outside Mainland China. 解除网易云音乐海外播放限制。
Version Downloads Last Updated
2.0.1 0 9/8/2026
2.0.1-beta 29 9/8/2026
2.0.0 40 9/7/2026
2.0.0-beta 85 8/31/2026
1.0.209-beta 14,514 4/23/2019
1.0.206-beta 839 4/23/2019
1.0.201 153,087 4/12/2019
1.0.200-beta 752 4/12/2019
1.0.190 117,483 10/16/2018
1.0.188-beta 1,227 10/11/2018
1.0.185-beta 943 10/10/2018
1.0.183-beta 926 10/10/2018
1.0.179 135,429 5/15/2018
1.0.175-beta 2,698 5/10/2018
1.0.172-beta 1,455 5/10/2018
1.0.170-beta 1,460 5/10/2018
1.0.167-beta 1,485 5/7/2018
1.0.164 53,313 5/7/2018
1.0.160-beta 1,598 4/30/2018
Loading failed