Table of Contents

Class WindowsVpnHost

Namespace
VpnHood.Core.Client.VpnServices.Host.WindowsTun
Assembly
VpnHood.Core.Client.VpnServices.Host.WindowsTun.dll

Provides the VPN host's whole Main, which a head's VPN host executable calls: the VPN service in a process of its own, with Core and nothing of the app, as the phones and the Store run it.

public static class WindowsVpnHost
Inheritance
WindowsVpnHost
Inherited Members

Remarks

The daemon starts it at a connect, and it ends with its session; the app reaches it as it reaches any VPN service, over the channel and the files in the storage's VPN service folder.

Methods

Run(IReadOnlyList<string>)

Runs the VPN host: it connects with the saved options, and returns once the session has ended.

public static Task<int> Run(IReadOnlyList<string> args)

Parameters

args IReadOnlyList<string>

The command line, as the daemon writes it (WindowsVpnHostArgs).

Returns

Task<int>

A task whose result is the exit code: 0 once the session has ended, or 2 where the command line is no VPN host's.

Remarks

From its first line on, its warnings and errors go to the Application log under the daemon's service name, or, for a dev run's daemon, which is no service, its lines go to vpn-host.log beside vpn.log; they go on there once the VPN service opens its own log.

Exceptions

Exception

The VPN service could not be made or run; the error is logged first.