StreamExtended 2.0.0-beta

This is a prerelease version of StreamExtended.
dotnet add package StreamExtended --version 2.0.0-beta
                    
NuGet\Install-Package StreamExtended -Version 2.0.0-beta
                    
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-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StreamExtended" Version="2.0.0-beta" />
                    
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-beta
                    
#r "nuget: StreamExtended, 2.0.0-beta"
                    
#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-beta
                    
#: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-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=StreamExtended&version=2.0.0-beta&prerelease
                    
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.

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)

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.0-beta 37 8/31/2026
1.0.209-beta 14,509 4/23/2019
1.0.206-beta 837 4/23/2019
1.0.201 151,777 4/12/2019
1.0.200-beta 748 4/12/2019
1.0.190 117,386 10/16/2018
1.0.188-beta 1,225 10/11/2018
1.0.185-beta 940 10/10/2018
1.0.183-beta 924 10/10/2018
1.0.179 135,352 5/15/2018
1.0.175-beta 2,693 5/10/2018
1.0.172-beta 1,453 5/10/2018
1.0.170-beta 1,459 5/10/2018
1.0.167-beta 1,484 5/7/2018
1.0.164 53,196 5/7/2018
1.0.160-beta 1,596 4/30/2018
1.0.157-beta 1,539 4/30/2018
1.0.147-beta 2,688 4/14/2018
1.0.144-beta 1,596 4/14/2018
Loading failed