Table of Contents

Class AppState

Namespace
VpnHood.AppLib.Api.App
Assembly
VpnHood.AppLib.Api.dll

Represents the app's state as it stands, which the UI polls to refresh.

public class AppState
Inheritance
AppState
Inherited Members

Properties

AccountTime

Gets when the account last changed, from any UI, or null where the build has no accounts (IsAccountSupported).

public required DateTime? AccountTime { get; init; }

Property Value

DateTime?

AlwaysOnState

Gets the always-on state, or null where the app does not keep always-on itself (AlwaysOnSupport).

public required AlwaysOnState? AlwaysOnState { get; init; }

Property Value

AlwaysOnState

CanConnect

Gets a value indicating whether the UI may offer Connect now.

public required bool CanConnect { get; init; }

Property Value

bool

CanDiagnose

Gets a value indicating whether the UI may offer Diagnose now.

public required bool CanDiagnose { get; init; }

Property Value

bool

CanDisconnect

Gets a value indicating whether the UI may offer Disconnect now.

public required bool CanDisconnect { get; init; }

Property Value

bool

ChannelProtocol

Gets the protocol of the session's channel, or, while idle, the settings' one.

public required ChannelProtocol ChannelProtocol { get; init; }

Property Value

ChannelProtocol

ClientCountryCode

Gets the client's country code: the country the server last reported for the client, else the device's region's; or null for a region that is no country, as 419.

public required string? ClientCountryCode { get; init; }

Property Value

string

ConfigTime

Gets when the app's settings last changed, which tells the UI to read them again.

public required DateTime ConfigTime { get; init; }

Property Value

DateTime

ConnectRequestTime

Gets when the person last asked to connect, or null.

public required DateTime? ConnectRequestTime { get; init; }

Property Value

DateTime?

ConnectionState

Gets where the VPN's connection stands.

public required AppConnectionState ConnectionState { get; init; }

Property Value

AppConnectionState

CurrentUiCultureInfo

Gets the language the app's UI uses now.

public required UiCultureInfo CurrentUiCultureInfo { get; init; }

Property Value

UiCultureInfo

HasDiagnoseRequested

Gets a value indicating whether the last connect was a diagnose, until the last error is cleared.

public required bool HasDiagnoseRequested { get; init; }

Property Value

bool

IsAdPrivacyOptionsRequired

Gets a value indicating whether the privacy settings must offer the ad consent's form again, for the person to change their answer.

public required bool IsAdPrivacyOptionsRequired { get; init; }

Property Value

bool

IsAnonymousTrackerPromptRequired

Gets a value indicating whether the first-run page must ask the person about the anonymous usage data first.

public required bool IsAnonymousTrackerPromptRequired { get; init; }

Property Value

bool

IsDiagnosing

Gets or sets a value indicating whether a diagnose is under way.

public required bool IsDiagnosing { get; set; }

Property Value

bool

IsIdle

Gets a value indicating whether the app is idle: neither connecting, connected nor disconnecting.

public required bool IsIdle { get; init; }

Property Value

bool

IsKillSwitchBlocking

Gets a value indicating whether the app's kill switch blocks the internet with no session, but for the device-level split.

public required bool IsKillSwitchBlocking { get; init; }

Property Value

bool

Remarks

The person's disconnect lifts it, which the UI offers beside Connect, as CanDisconnect is false with the session gone; but where it is kept while disconnected (Lockdown), only another level does.

IsNotificationEnabled

Gets a value indicating whether the app may show notifications, or null where the device does not say.

public required bool? IsNotificationEnabled { get; init; }

Property Value

bool?

IsProxyEndPointActive

Gets a value indicating whether the settings' proxy mode has a proxy to use: the device's proxy where it has one, or the person's list where it is not empty.

public required bool IsProxyEndPointActive { get; init; }

Property Value

bool

IsQuickLaunchRecommended

Gets a value indicating whether the UI should offer the Quick Launch, which the person has not been asked about yet.

public required bool IsQuickLaunchRecommended { get; init; }

Property Value

bool

IsReconnectRequired

Gets a value indicating whether a changed setting needs a reconnect to apply, until the person clears it, connects or disconnects.

public required bool IsReconnectRequired { get; init; }

Property Value

bool

IsWaitingForInternalAd

Gets or sets a value indicating whether the app waits for the UI's own ad to end.

public required bool? IsWaitingForInternalAd { get; set; }

Property Value

bool?

LastError

Gets the last error, until it is cleared, or null.

public required ApiError? LastError { get; init; }

Property Value

ApiError

LogExists

Gets a value indicating whether the app has a log.

public required bool LogExists { get; init; }

Property Value

bool

PromotionExists

Gets a value indicating whether the app has a promotion to show: its image is saved, the remote settings' promotion is on, and the current VPN profile is not premium; never in China.

public required bool PromotionExists { get; init; }

Property Value

bool

PromptForLog

Gets a value indicating whether the UI should offer the log: the app is idle after a diagnose, and a log exists.

public required bool PromptForLog { get; init; }

Property Value

bool

ProxyConnectorStatus

Gets the status of the proxies the last connection reached its server through, or null.

public required AppProxyConnectorStatus? ProxyConnectorStatus { get; init; }

Property Value

AppProxyConnectorStatus

PurchaseState

Gets where the in-app purchase stands, or null where the app has no billing.

public required PurchaseState? PurchaseState { get; init; }

Property Value

PurchaseState?

ServerLocationInfo

Gets the session's server location, or, while idle, the one the current VPN profile has chosen, or null.

public required CurrentServerLocationInfo? ServerLocationInfo { get; init; }

Property Value

CurrentServerLocationInfo

SessionInfo

Gets the session's information, or null while the app is idle.

public required AppSessionInfo? SessionInfo { get; init; }

Property Value

AppSessionInfo

SessionStatus

Gets the session's status, or null while the app is idle.

public required AppSessionStatus? SessionStatus { get; init; }

Property Value

AppSessionStatus

SplitTunnelingState

Gets the split tunneling's state, as the settings and the session make it.

public required SplitTunnelingState SplitTunnelingState { get; init; }

Property Value

SplitTunnelingState

StateProgress

Gets the progress of a long connect step, in percent, as the ad's load while the app waits for one, or null.

public required int? StateProgress { get; init; }

Property Value

int?

SystemBarsInfo

Gets the heights of the system bars over the app's window; none where no window is open.

public required SystemBarsInfo SystemBarsInfo { get; init; }

Property Value

SystemBarsInfo

SystemPrivateDns

Gets the device's private DNS, or null where the device cannot tell it.

public required PrivateDns? SystemPrivateDns { get; init; }

Property Value

PrivateDns

SystemUiCultureInfo

Gets the system's language.

public required UiCultureInfo SystemUiCultureInfo { get; init; }

Property Value

UiCultureInfo

TcpForwardingLockReason

Gets why the TCP forwarding switch is locked, if it is.

public required TcpForwardingLockReason TcpForwardingLockReason { get; init; }

Property Value

TcpForwardingLockReason

UpdaterStatus

Gets the updater's status, or null where the app has no updater.

public required AppUpdaterStatus? UpdaterStatus { get; init; }

Property Value

AppUpdaterStatus

UserReviewRecommended

Gets the review the server recommends asking for after the last disconnect, or 0 where none is; a recorded review or a new connect sets it back to 0.

public required int UserReviewRecommended { get; init; }

Property Value

int

VpnProfile

Gets the current VPN profile, or null where none is chosen.

public required VpnProfileBaseInfo? VpnProfile { get; init; }

Property Value

VpnProfileBaseInfo