H.VpnService
0.9.11
See the version list below for details.
dotnet add package H.VpnService --version 0.9.11
NuGet\Install-Package H.VpnService -Version 0.9.11
<PackageReference Include="H.VpnService" Version="0.9.11" />
paket add H.VpnService --version 0.9.11
#r "nuget: H.VpnService, 0.9.11"
// Install H.VpnService as a Cake Addin #addin nuget:?package=H.VpnService&version=0.9.11 // Install H.VpnService as a Cake Tool #tool nuget:?package=H.VpnService&version=0.9.11
H.Vpn
A set of C# libraries for VPN implementation
Features
- Supports firewall that will block the internet if there are connection problems.
- Based on OpenVPN
Nuget
Usage
H.Firewall
Forbids for 15 seconds everything except LAN/DNS/Localhost requests and Chrome applications.
NOTE: To use this code in your application, you must either run it as an administrator or
run it through a service talking to it via IPC (eg H.Pipes).
Else you will get the following error: 0x8032000D. The call must be made from within an explicit transaction.
using var firewall = new HFirewall();
firewall.Start();
firewall.RunTransaction(ptr =>
{
var (providerKey, subLayerKey) = firewall.RegisterKeys();
firewall.PermitAppId(
providerKey,
subLayerKey,
@"C:\Users\haven\AppData\Local\Google\Chrome\Application\chrome.exe",
15);
firewall.PermitLan(providerKey, subLayerKey, 12);
firewall.PermitDns(providerKey, subLayerKey, 11, 10);
firewall.PermitLocalhost(providerKey, subLayerKey, 1);
// Block everything not allowed explicitly
firewall.BlockAll(providerKey, subLayerKey, 0);
});
await Task.Delay(TimeSpan.FromSeconds(15));
H.Firewall uses WFP calls internally, you can learn more about this.
Usage
Contacts
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- H.Pipes.AccessControl (>= 2.0.53)
- H.Vpn (>= 0.9.11)
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.0
- H.Pipes.AccessControl (>= 2.0.53)
- H.Vpn (>= 0.9.11)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- H.Pipes.AccessControl (>= 2.0.53)
- H.Vpn (>= 0.9.11)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- H.Pipes.AccessControl (>= 2.0.53)
- H.Vpn (>= 0.9.11)
- Newtonsoft.Json (>= 13.0.3)
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 |
---|---|---|
0.9.27 | 282 | 11/7/2023 |
0.9.26 | 115 | 11/5/2023 |
0.9.24 | 101 | 11/5/2023 |
0.9.23 | 184 | 8/28/2023 |
0.9.22 | 139 | 8/25/2023 |
0.9.21 | 135 | 8/24/2023 |
0.9.20 | 142 | 8/24/2023 |
0.9.19 | 133 | 8/24/2023 |
0.9.18 | 142 | 8/24/2023 |
0.9.17 | 142 | 8/24/2023 |
0.9.16 | 133 | 8/23/2023 |
0.9.15 | 138 | 8/23/2023 |
0.9.14 | 134 | 8/23/2023 |
0.9.13 | 132 | 8/23/2023 |
0.9.12 | 131 | 8/23/2023 |
0.9.11 | 141 | 8/23/2023 |
0.9.10 | 129 | 8/23/2023 |
0.9.9 | 145 | 8/23/2023 |
0.9.8 | 133 | 8/22/2023 |
0.9.7 | 416 | 10/7/2022 |
0.9.6 | 397 | 5/19/2022 |
0.9.5 | 441 | 3/28/2022 |
0.9.4 | 424 | 3/10/2022 |
0.9.1 | 423 | 3/9/2022 |
⭐ Last 10 features:
- feat: Added BlockUri extension. 2023-08-23
- feat: Added SupportedOSPlatform attributes and fixed some warnings. 2023-08-22
- feat: Updated. 2023-08-22
- feat: Added PermitTcpPortV4 methods. 2022-10-07
- feat: Commented split tunneling code. 2022-05-19
- feat: Converted H.Wfp to CsWin32. 2022-03-28
- feat(HFirewall): Moved Settings and related methods to HVpn. 2022-03-10
- feat(HFirewall): Added helper methods. 2022-03-10
- feat: Initial commit. 2022-03-10
🐞 Last 10 bug fixes:
- fix: Fixed warnings. 2023-08-23
- fix: Fixed some warnings. 2023-08-23
- feat: Added SupportedOSPlatform attributes and fixed some warnings. 2023-08-22
- fix: Fixed CI error. 2022-03-10
- fix: Removed H.IpHlpApi reference from H.Firewall. 2022-03-10
- fix: Fixed CA1063. 2022-03-10
- fix: Fixed warnings. 2022-03-10
- fix: Disabled CI tests. 2022-03-10