VpnHood.Net.Quic.Abstractions 9.1.874

dotnet add package VpnHood.Net.Quic.Abstractions --version 9.1.874
                    
NuGet\Install-Package VpnHood.Net.Quic.Abstractions -Version 9.1.874
                    
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.874" />
                    
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.874" />
                    
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.874
                    
#r "nuget: VpnHood.Net.Quic.Abstractions, 9.1.874"
                    
#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.874
                    
#: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.874
                    
Install as a Cake Addin
#tool nuget:?package=VpnHood.Net.Quic.Abstractions&version=9.1.874
                    
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). VpnHood.Net.Toolkit does not reference it: Toolkit references no other project.

Surface

Type Role
IQuicClientFactory A platform's QUIC — IsSupported, CreateClient() → IQuicClient
IQuicClient Client connector — ConnectAsync(QuicClientConnectOptions, ct) → IQuicConnection
IQuicServer Server listener factory — ListenAsync(QuicListenerOptions, ct) → IQuicListener
IQuicListener Accepts inbound connections (server) — AcceptConnectionAsync(ct)
IQuicConnection Opens (OpenOutboundStreamAsync(ct)) and accepts (AcceptInboundStreamAsync(ct)) streams as System.IO.Stream; both sides do both
IQuicServerConnection A server's connection: also opens write-only streams (OpenOutboundUnidirectionalStreamAsync(ct)) and closes with an error code (CloseAsync(errorCode, ct))
IQuicStream The QUIC controls of a server's stream: StreamId, AbortRead/AbortWrite codes, CompleteWrites, WriteFinal, ReadsClosed/WritesClosed
QuicClientConnectOptions RemoteEndPoint, TargetHost, CertificateValidationCallback, MaxInboundBidirectionalStreams
QuicListenerOptions ListenEndPoint, IdleTimeout, ServerCertificateSelector, stream limits and default error codes

The implementations set what VpnHood keeps constant, which is not exposed here: TLS 1.3, the Http3 ALPN token and EncryptionPolicy.RequireEncryption; MsQuic also sets X509RevocationMode.NoCheck. Each client leaves the server's certificate to CertificateValidationCallback; none pins a certificate itself.

How it is wired into VpnHood

Implementations:

  • VpnHood.Net.Quic.MsQuic (Windows / Linux) — MsQuicClient, MsQuicServer, MsQuicConnection, MsQuicListener, MsQuicClientFactory. 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, IosQuicClientFactory, built on Apple's Network.framework (NWMultiplexGroup / NWConnectionGroup / NWProtocolQuicOptions). Client only (iOS is never a server).
  • VpnHood.Net.Quic.Android — AndroidQuicClient, AndroidQuicConnection, AndroidQuicStream, AndroidQuicClientFactory, over a libmsquic.so built for Android (see that project's README). Client only.

Client — the QUIC of the client's socket factory

IQuicClientFactory is the platform's QUIC:

bool IsSupported { get; }
IQuicClient CreateClient(); // throws NotSupportedException when !IsSupported

The per-platform VpnService hands VpnServiceHost one IClientSocketFactory (VpnHood.Core.Client): a ClientSocketFactory of a SystemSocketFactory for its sockets and the platform's QUIC client factory, which is the seam that decides QUIC support:

  • Windows / Linux VpnService → new MsQuicClientFactory().
  • iOS VpnService → new IosQuicClientFactory(…) (iOS 15+).
  • Android VpnService → new AndroidQuicClientFactory() (wherever the native library loads).
  • null: no QUIC; the client keeps to TCP.

It flows VpnServiceHost → VpnHoodClient → ClientSessionBuilder → ConnectorService, where QuicStreamConnectionFactory is built from CreateClient() (only when IsSupported). The client wraps the sockets (protection, binding, configuring) and keeps the QUIC client factory as it is: those wrappers know nothing of QUIC.

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 IQuicClientFactory whose IsSupported is true and whose CreateClient() returns your IQuicClient.
  3. Have that platform's VpnService hand VpnServiceHost a ClientSocketFactory with that factory as its quicClientFactory.

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

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

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on VpnHood.Net.Quic.Abstractions:

Package Downloads
VpnHood.Core.Client

The VpnHood VPN client engine: it finds a server, builds a session with it, and runs the session's tunnel on a VPN adapter. To build an app, start from VpnHood.AppLib.App.

VpnHood.Core.Server

The VpnHood VPN server engine: it takes its configuration from its access manager, listens for clients, and carries their sessions.

VpnHood.Net.Quic.MsQuic

MsQuic (System.Net.Quic) implementation of the VpnHood QUIC abstractions. Supported on Windows and Linux.

VpnHood.Net.Quic.Ios

iOS (Apple Network.framework, iOS 15+) implementation of the VpnHood QUIC abstractions.

VpnHood.Net.Quic.Android

Android implementation of the VpnHood QUIC abstractions (IQuicClient/IQuicConnection/Stream) over MsQuic. All native linking (libmsquic.so) and the Microsoft.Quic P/Invoke bindings are provided by the VpnHood.Net.Quic.MsQuic.AndroidNative package; this project is pure managed code.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.874 0 11/15/2026
9.1.864 533 11/3/2026
9.0.860 527 10/31/2026
9.0.859.16-prerelease 435 10/30/2026
9.0.857 595 10/20/2026
9.0.856 507 10/19/2026
9.0.855 524 10/13/2026
8.2.853.11-prerelease 492 10/5/2026
8.2.853 506 9/23/2026
8.2.852 489 9/23/2026