Table of Contents

Class ClientPolicy

Namespace
VpnHood.Core.Common.Tokens
Assembly
VpnHood.Core.Common.dll

Represents what an access key's issuer offers the people of a set of countries: free and premium plans, and which locations they may pick.

public class ClientPolicy
Inheritance
ClientPolicy
Inherited Members

Properties

AutoLocationOnly

Gets a value indicating whether only the automatic location may be picked.

[JsonPropertyName("ao")]
public bool AutoLocationOnly { get; init; }

Property Value

bool

CanExtendPremiumByAd

Gets a value indicating whether a premium session can be extended by a rewarded ad; no client or server acts on it yet.

[JsonPropertyName("pbe")]
public bool CanExtendPremiumByAd { get; init; }

Property Value

bool

ClientCountries

Gets the country codes the policy is for; * stands for any country with no policy of its own.

[JsonPropertyName("ccs")]
public required string[] ClientCountries { get; init; }

Property Value

string[]

FreeLocations

Gets the country codes of the locations free connections may use, or null.

[JsonPropertyName("free")]
public string[]? FreeLocations { get; init; }

Property Value

string[]

Normal

Gets the minutes of a free connection, 0 for no limit, or null where none is offered (Normal).

[JsonPropertyName("n")]
public int? Normal { get; init; }

Property Value

int?

NormalByRewardedAd

Gets the minutes of a free connection after a rewarded ad, 0 for no limit, or null where none is offered (NormalByRewardedAd).

[JsonPropertyName("nbr")]
public int? NormalByRewardedAd { get; init; }

Property Value

int?

PremiumByCode

Gets a value indicating whether a premium code can be entered.

[JsonPropertyName("pbc")]
public bool PremiumByCode { get; init; }

Property Value

bool

PremiumByPurchase

Gets a value indicating whether premium can be bought.

[JsonPropertyName("pbp")]
public bool PremiumByPurchase { get; init; }

Property Value

bool

PremiumByRewardedAd

Gets the minutes of premium a rewarded ad gives, 0 for no limit, or null where none is offered (PremiumByRewardedAd).

[JsonPropertyName("pbr")]
public int? PremiumByRewardedAd { get; init; }

Property Value

int?

PremiumByTrial

Gets the minutes of a premium trial, 0 for no limit, or null where none is offered (PremiumByTrial).

[JsonPropertyName("pbt")]
public int? PremiumByTrial { get; init; }

Property Value

int?

PremiumByTrialDailyLimit

Gets how much premium trial a day allows, or null for no daily limit.

[JsonPropertyName("pbtdl")]
[JsonConverter(typeof(TimeSpanConverter))]
public TimeSpan? PremiumByTrialDailyLimit { get; init; }

Property Value

TimeSpan?

PurchaseUrl

The shop this operator sells through. Naming one REPLACES the app's own store: the client shows this page and nothing else, so an in-app store and an outside shop are never offered side by side. A build shipped through a store ignores it outright — where the link may be shown is a property of the BUILD, never of a country or a server.

[JsonPropertyName("pur_url")]
public Uri? PurchaseUrl { get; init; }

Property Value

Uri

UnblockableOnly

Gets a value indicating whether only locations of unblockable servers are offered.

[JsonPropertyName("uo")]
public bool UnblockableOnly { get; init; }

Property Value

bool