Class VpnHoodWindowsVpnPluginApp
- Namespace
- VpnHood.AppLib.App.WindowsVpnPlugin
- Assembly
- VpnHood.AppLib.App.WindowsVpnPlugin.dll
Provides the app as the Windows VPN plug-in runs it: in the window's process, as the person, in the package's own folder.
public class VpnHoodWindowsVpnPluginApp : Singleton<VpnHoodWindowsVpnPluginApp>
- Inheritance
-
VpnHoodWindowsVpnPluginApp
- Inherited Members
Remarks
The tunnel is Windows': the package's VPN host, which Windows starts when the app's VPN profile connects, holds it and outlives the app, so closing the app leaves the connection up and the next start finds it. While the app runs, it tries to connect the VPN again after a sleep that ended it, once the screen is on, where Windows lets it watch the sleeps.
Methods
Dispose(bool)
Releases the instance; with disposing and when it is the registered one, unregisters it.
protected override void Dispose(bool disposing)
Parameters
Init(AppInitParams)
Starts the app, once, with one per person: it takes the single-instance lock in the package's folder first; a second call gives the app started already.
public static VpnHoodWindowsVpnPluginApp Init(AppInitParams initParams)
Parameters
initParamsAppInitParamsThe init params.
Returns
- VpnHoodWindowsVpnPluginApp
The app.
Remarks
An ad provider that names countries both to include and to exclude fails the start.
Exceptions
- ArgumentNullException
The init params' app name is null.
- OverflowException
A duration in a built-in access key is out of range.
- InvalidDataException
A built-in access key decodes to JSON
null.- JsonException
A built-in access key holds no valid access key.
- NotSupportedException
A built-in access key's version is not one the app reads.
- FormatException
A built-in access key is no valid Base64, or an endpoint or a duration in it is not valid.
- ArgumentException
The init params' app name is empty.
- InvalidOperationException
The process does not run from the package, or the core app has started already, outside this class.
- AnotherInstanceIsRunningException
Another instance of the app holds the lock.