Class ConnectionInfo
- Namespace
- VpnHood.Core.Client.VpnServices.Abstractions
- Assembly
- VpnHood.Core.Client.VpnServices.Abstractions.dll
Represents the VPN service's connection as it reports it to the app: its state, its session, and its error.
public class ConnectionInfo
- Inheritance
-
ConnectionInfo
- Inherited Members
Remarks
The service writes it to its config folder as VpnStatusFileName at each state change, and sends it with each answer (ConnectionInfo).
Properties
ClientState
Gets the client's state.
public required ClientState ClientState { get; init; }
Property Value
ClientStateChangedTime
Gets when the state last changed, in UTC, or null.
public required DateTime? ClientStateChangedTime { get; init; }
Property Value
ClientStateProgress
Gets the progress of the state, while the client finds a server or checks its proxies, or null.
public required ProgressStatus? ClientStateProgress { get; init; }
Property Value
CreatedTime
Gets when the VPN service made this info, in UTC, or null where the app made it itself.
public required DateTime? CreatedTime { get; init; }
Property Value
Default
Gets the placeholder before the VPN service has made a real one: Initializing, with its creation time and nothing else. Every answer must carry a connection's info, so transports and the host answer with this until then.
public static ConnectionInfo Default { get; }
Property Value
Error
Gets the error the connection failed or ended with, or null.
public required ApiError? Error { get; init; }
Property Value
ProxyConnectorStatus
Gets the state of the proxies the client connects through, or null where it uses none.
public required ProxyConnectorStatus? ProxyConnectorStatus { get; init; }
Property Value
SessionInfo
Gets the session as its server set it up, or null where there is none, before the session or after it.
public required SessionInfo? SessionInfo { get; init; }
Property Value
SessionName
Gets the name the VPN adapter gives the session where the OS shows one (SessionName), or null.
public string? SessionName { get; init; }
Property Value
SessionStatus
Gets the session's state, or null where there is no session, before it or after it.
public required SessionStatus? SessionStatus { get; init; }
Property Value
VpnEngineInfo
Gets the engine's report of itself, or null where the app speaks for it, before any status.
public VpnEngineInfo? VpnEngineInfo { get; init; }
Property Value
Methods
IsStarted()
Determines whether the connection is started: its state is none of None, Disposed and Disconnecting.
public bool IsStarted()