Table of Contents

Class ClientPolicy

Namespace
VpnHood.AppLib.Api.VpnProfiles
Assembly
VpnHood.AppLib.Api.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 IReadOnlyList<string> ClientCountries { get; init; }

Property Value

IReadOnlyList<string>

FreeLocations

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

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

Property Value

IReadOnlyList<string>

Normal

Gets the minutes of an ordinary 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 an ordinary 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

Gets the shop this operator sells through, or null.

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

Property Value

Uri

Remarks

A shop named here takes the place of the app's own store: the app shows its page and no other, so an in-app store and an outside shop are never offered together. A build whose IsPurchaseUrlSupported is false ignores it.

UnblockableOnly

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

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

Property Value

bool