AetherNet.Transport.WebRtc 2.0.0

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

AetherNet.Transport.WebRtc

Direct peer-to-peer transport for AetherNet over a WebRTC RTCDataChannel — two nodes talk directly over the internet with no central server in the data path.

Built on SIPSorcery (pure C#, cross-platform, Android/iOS-capable). It implements ITransportService, so TransportManager slots it into the transport ladder between the radio mesh (proximity, cheapest) and the QUIC/HTTP relay (last resort): when a direct path can be negotiated the conversation flows peer-to-peer; otherwise the relay carries it. PowerCostRelative = 45.

How it stays serverless

A WebRTC connection still needs a one-time signalling exchange (the SDP offer/answer plus ICE candidates). AetherNet carries that handshake over a channel you already have — the QUIC/HTTP relay, or even the radio mesh — instead of a dedicated signalling server. Once the channel is open, the conversation flows directly between the two devices.

  • IWebRtcSignaling — the signalling seam.
  • RelayWebRtcSignaling — carries the handshake over any ITransportService (the cross-device path), framed with a magic prefix + source-generated (AOT-safe) JSON; non-signalling bytes pass through untouched as ordinary app traffic.
  • InMemoryWebRtcSignalingBus — ordered in-process signalling for simulations and tests.

Install

dotnet add package AetherNet.Transport.WebRtc

Usage

services
    // 1. Choose a signalling carrier:
    .AddRelayWebRtcSignaling<QuicRelayTransportService>()   // cross-device: ride the relay
    // 2. Register the transport (joins TransportManager's ladder at PowerCostRelative 45):
    .AddWebRtcTransport(localUhid: "aether:alice:01");

ICE servers default to a public STUN server. Pass an explicit list to override; an explicit empty list forces host-candidate-only ICE (same-LAN / loopback, no STUN/TURN):

services.AddWebRtcTransport(
    localUhid: "aether:alice:01",
    iceServers: new[]
    {
        new RTCIceServer { urls = "stun:stun.l.google.com:19302" },
        new RTCIceServer { urls = "turn:turn.example.com", username = "u", credential = "p" },
    });

For a single-process host (simulations, a device holding several identities) use the in-process bus instead of a relay:

services.AddInMemoryWebRtcSignaling("aether:alice:01")
        .AddWebRtcTransport(localUhid: "aether:alice:01");

License

MIT — see the repository root.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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
2.0.0 0 6/27/2026