Agash.StreamTransport.Stun 0.1.0-alpha

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

Agash.StreamTransport.Stun

Embeddable STUN binding server and ICE-server providers for Agash.StreamTransport.

STUN server

StunBindingServer answers RFC 5389 binding requests with the caller's reflexive address - everything WebRTC ICE needs to gather server-reflexive candidates. Single UDP port, cross-platform, no RFC 3489 NAT-type detection.

await using var stun = new StunBindingServer(new IPEndPoint(IPAddress.Any, 3478));
stun.Start();

This is what the light agent ships with: run one on a reachable UDP port (or co-host it with the relay) so peers discover their public address without depending on a third-party STUN service.

ICE-server providers

Plug an IIceServerProvider into the signaling router; the ICE servers it returns are shipped to each peer in its Welcome.

  • StaticIceServerProvider - a fixed list (STUN-only, or TURN with static credentials). StaticIceServerProvider.Stun("stun:stun.example.com:3478").
  • CoturnSharedSecretIceServerProvider - bring your own TURN. Advertises an external self-hosted coturn (configured with static-auth-secret) using the TURN REST API ephemeral-credential scheme: username = "{unixExpiry}", credential = base64(HMAC-SHA1(secret, username)). Fresh, time-limited credentials per peer.
var ice = new CoturnSharedSecretIceServerProvider(
    stunUrls: ["stun:turn.example.com:3478"],
    turnUrls: ["turn:turn.example.com:3478?transport=udp"],
    sharedSecret: coturnStaticAuthSecret);
var router = new SignalingRouter(ice);

A native, in-process TURN relay (Agash.StreamTransport.Turn) is a separate, later package. Most deployments don't host TURN - the agent is STUN-only and relies on DevTunnels for signaling reachability - so TURN stays optional and external until then.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
0.1.0-alpha 56 6/20/2026
0.0.0-alpha.0 45 6/20/2026