VpnHood.Net.Quic.Abstractions 9.1.864

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

VpnHood.Net.Quic.Abstractions

A minimal abstraction over the QUIC surface VpnHood actually uses, so the rest of the codebase does not depend on System.Net.Quic/MsQuic directly.

VpnHood uses QUIC purely as a transport (a custom protocol with the same binary framing as TCP — not HTTP/3; SslApplicationProtocol.Http3 is used only as the ALPN token). System.Net.Quic is a managed wrapper over the native MsQuic library and is only officially supported on Windows and Linux — on Android/iOS QuicConnection.IsSupported/QuicListener.IsSupported are false and the APIs throw. This abstraction keeps MsQuic as one implementation beside the platform-specific ones for iOS and Android.

This project is BCL-only (no VpnHood or native dependencies) so it is safe to reference from the low-level VpnHood.Net.Toolkit.

Surface

Type Role
IQuicClient Client connector — ConnectAsync(QuicClientConnectOptions) → IQuicConnection
IQuicServer Server listener factory — ListenAsync(QuicListenerOptions) → IQuicListener
IQuicListener Accepts inbound connections (server) — AcceptConnectionAsync()
IQuicConnection Opens (OpenOutboundStreamAsync, client) / accepts (AcceptInboundStreamAsync, server) bidirectional streams as System.IO.Stream
QuicClientConnectOptions RemoteEndPoint, TargetHost, CertificateValidationCallback
QuicListenerOptions ListenEndPoint, IdleTimeout, ServerCertificateSelector

Everything else VpnHood needs is constant and is baked into the implementation, not exposed here: TLS 1.3, the Http3 ALPN token, EncryptionPolicy.RequireEncryption, X509RevocationMode.NoCheck, default stream/close error codes 0, and QuicStreamType.Bidirectional.

How it is wired into VpnHood

Implementations:

  • VpnHood.Net.Quic.MsQuic (Windows / Linux) — MsQuicClient, MsQuicServer, MsQuicConnection, MsQuicListener, MsQuicSocketFactory. Owns the Microsoft.Native.Quic.MsQuic.OpenSSL native package. MsQuicClient.IsSupported / MsQuicServer.IsSupported report platform availability. Client and server.
  • VpnHood.Net.Quic.Ios (iOS 15+) — IosQuicClient, IosQuicConnection, IosQuicStream, IosSocketFactory, built on Apple's Network.framework (NWMultiplexGroup / NWConnectionGroup / NWProtocolQuicOptions). Client only (iOS is never a server).
  • VpnHood.Net.Quic.Android — AndroidQuicClient, AndroidQuicConnection, AndroidQuicStream, AndroidSocketFactory, over a libmsquic.so built for Android (see that project's README). Client only.

Client — through ISocketFactory

ISocketFactory (in VpnHood.Net.Toolkit) exposes QUIC capability:

bool IsQuicSupported { get; }
IQuicClient CreateQuicClient(); // throws NotSupportedException when !IsQuicSupported

The per-platform VpnService picks the socket factory, which is the seam that decides QUIC support:

  • Windows / Linux VpnService → new MsQuicSocketFactory() (QUIC enabled).
  • iOS VpnService → new IosSocketFactory(…) (QUIC enabled, iOS 15+).
  • Android VpnService → new AndroidSocketFactory() (QUIC wherever the native library loads).

The socket factory flows VpnService → VpnHoodClient → ConnectorService, where QuicStreamConnectionFactory is built from socketFactory.CreateQuicClient() (only when IsQuicSupported). The decorators (ConfiguringSocketFactory, BindingSocketFactory, AdapterSocketFactory) forward IsQuicSupported/CreateQuicClient to their inner factory.

Server — explicit on VpnHoodServer

The server QUIC listener provider is passed explicitly (not via ISocketFactory): ServerOptions.QuicServer → VpnHoodServer → ServerHost → QuicListenerHost. ServerApp sets it to MsQuicServer.IsSupported ? new MsQuicServer() : null.

Adding another platform

  1. Implement IQuicClient + IQuicConnection over the platform's QUIC, as VpnHood.Net.Quic.Ios does over Network.framework and VpnHood.Net.Quic.Android over a self-built libmsquic.so.
  2. Expose it through an ISocketFactory whose IsQuicSupported is true and whose CreateQuicClient() returns your IQuicClient.
  3. Have that platform's VpnService construct/use that socket factory instead of SystemSocketFactory.

No other VpnHood code needs to change — the abstraction is the single seam.

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 VpnHood.Net.Quic.Abstractions:

Package Downloads
VpnHood.Core.Server

The core of VpnHood server. It can listen and accept connections from VpnHood clients

VpnHood.Net.Toolkit

VpnHood Toolkit Library can be used in any project

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.864 438 11/3/2026
9.0.860 525 10/31/2026
9.0.859.16-prerelease 432 10/30/2026
9.0.857 592 10/20/2026
9.0.856 503 10/19/2026
9.0.855 520 10/13/2026
8.2.853.11-prerelease 491 10/5/2026
8.2.853 503 9/23/2026
8.2.852 487 9/23/2026