A set of C# libraries for VPN implementation
- Supports firewall that will block the internet if there are connection problems.
- Based on OpenVPN
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 FirewallBuilder()
.Block()
.All()
.Allow()
.Localhost()
.DomainNameSystem()
.LocalAreaNetwork()
.Application(@"C:\Users\haven\AppData\Local\Google\Chrome\Application\chrome.exe")
.Build();
await Task.Delay(TimeSpan.FromSeconds(15));
H.Firewall uses WFP calls internally, you can learn more about this.
- [Introduction to the Windows Filtering Platform](https://scorpiosoftware.net/2022/12/25/introduction-to-the-windows-filtering-platform/]
- WFPExplorer