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
<PackageReference Include="VpnHood.Net.Quic.Abstractions" Version="9.1.864" />
<PackageVersion Include="VpnHood.Net.Quic.Abstractions" Version="9.1.864" />
<PackageReference Include="VpnHood.Net.Quic.Abstractions" />
paket add VpnHood.Net.Quic.Abstractions --version 9.1.864
#r "nuget: VpnHood.Net.Quic.Abstractions, 9.1.864"
#:package VpnHood.Net.Quic.Abstractions@9.1.864
#addin nuget:?package=VpnHood.Net.Quic.Abstractions&version=9.1.864
#tool nuget:?package=VpnHood.Net.Quic.Abstractions&version=9.1.864
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 theMicrosoft.Native.Quic.MsQuic.OpenSSLnative package.MsQuicClient.IsSupported/MsQuicServer.IsSupportedreport 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 alibmsquic.sobuilt 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
- Implement
IQuicClient+IQuicConnectionover the platform's QUIC, asVpnHood.Net.Quic.Iosdoes over Network.framework andVpnHood.Net.Quic.Androidover a self-builtlibmsquic.so. - Expose it through an
ISocketFactorywhoseIsQuicSupportedistrueand whoseCreateQuicClient()returns yourIQuicClient. - Have that platform's
VpnServiceconstruct/use that socket factory instead ofSystemSocketFactory.
No other VpnHood code needs to change — the abstraction is the single seam.
| Product | Versions 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. |
-
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 |