Table of Contents

Class Utilities

Namespace
Cmpnnt.Pia.Ctl
Assembly
Cmpnnt.Pia.Ctl.dll

This class contains utilities not available in the piactl CLI.

public class Utilities
Inheritance
Utilities
Inherited Members

Constructors

Utilities()

public Utilities()

Utilities(PiaCtl)

public Utilities(PiaCtl piaCtl)

Parameters

piaCtl PiaCtl

Methods

Snooze(int, CancellationToken)

Disconnects the VPN connection for the specified duration. If the advanced killswitch feature is enabled, snoozing the VPN will prevent internet access.

public Task<PiaResults> Snooze(int duration, CancellationToken ct = default)

Parameters

duration int

The duration, in seconds, to suspend the VPN.

ct CancellationToken

Returns

Task<PiaResults>

A Task<PiaResults> containing standard output and standard error results.

SwitchToFastest(MultiRegion)

Switches to the fastest server in a given region. The region must have multiple servers.

public Task<PiaResults> SwitchToFastest(MultiRegion regionPrefix)

Parameters

regionPrefix MultiRegion

The two-letter prefix of the region in which the servers reside.

Returns

Task<PiaResults>

A Task<PiaResults> containing standard output and standard error results.