VpnHood.Net.VpnAdapters.AndroidTun
9.1.875
dotnet add package VpnHood.Net.VpnAdapters.AndroidTun --version 9.1.875
NuGet\Install-Package VpnHood.Net.VpnAdapters.AndroidTun -Version 9.1.875
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.VpnAdapters.AndroidTun" Version="9.1.875" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VpnHood.Net.VpnAdapters.AndroidTun" Version="9.1.875" />
<PackageReference Include="VpnHood.Net.VpnAdapters.AndroidTun" />
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.VpnAdapters.AndroidTun --version 9.1.875
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VpnHood.Net.VpnAdapters.AndroidTun, 9.1.875"
#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.VpnAdapters.AndroidTun@9.1.875
#: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.VpnAdapters.AndroidTun&version=9.1.875
#tool nuget:?package=VpnHood.Net.VpnAdapters.AndroidTun&version=9.1.875
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
VpnHood.Net.VpnAdapters.AndroidTun
The Android VPN adapter of VpnHood: the TUN interface that Android's
VpnService gives an app, whose IP packets a VPN reads and writes. It implements
VpnHood.Net.VpnAdapters.Abstractions.
dotnet add package VpnHood.Net.VpnAdapters.AndroidTun
How it works
AndroidVpnAdapteris anIVpnAdapter: make it inside yourVpnServicewith the service and anAndroidVpnAdapterSettings, and use it as the Abstractions quick start usesNullVpnAdapter.- A start describes the interface to a
VpnService.Builder(addresses, routes, DNS servers, MTU, session name and the apps to include or exclude), establishes it, and reads and writes packets through libc on its file descriptor. - The interface stays up when the device moves to other networks, which Android handles, and takes its meteredness from the networks under it. There is no NAT and no metric.
ProtectSocketkeeps a socket, such as the one to the VPN server, out of the tunnel withVpnService.Protect.GetPrimaryAdapterDnsServersgives the DNS servers of the validated networks under the VPN, which .NET does not list on Android.
Requirements
- Android 7.0 (API level 24) or later, with .NET 11 for Android.
- A
VpnServicein the app's manifest with theandroid.permission.BIND_VPN_SERVICEpermission and anandroid.net.VpnServiceintent filter, and the app'sandroid.permission.ACCESS_NETWORK_STATEpermission, whichGetPrimaryAdapterDnsServersneeds. VpnService.Preparechecked before each connection, with the user's consent asked when it returns an intent.
License
LGPL-2.1-only. See the VpnHood repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0-android37.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net11.0-android37.0
- VpnHood.Net.VpnAdapters.Abstractions (>= 9.1.875)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on VpnHood.Net.VpnAdapters.AndroidTun:
| Package | Downloads |
|---|---|
|
VpnHood.Core.Client.VpnServices.Host.Android
VpnHood's VPN service on Android: the VPN service's half, which runs the engine |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.1.875 | 26 | 11/16/2026 |
| 9.1.874 | 46 | 11/15/2026 |
| 9.1.864 | 101 | 11/3/2026 |
| 9.0.860 | 107 | 10/31/2026 |
| 9.0.859.16-prerelease | 95 | 10/30/2026 |
| 9.0.857 | 102 | 10/20/2026 |
| 9.0.856 | 102 | 10/19/2026 |
| 9.0.855 | 97 | 10/13/2026 |
| 8.2.853.11-prerelease | 104 | 10/5/2026 |
| 8.2.853 | 136 | 9/23/2026 |
| 8.2.852 | 125 | 9/23/2026 |