C# Класс SimpleDnsCrypt.Tools.DnsCryptProxyManager

Class to manage the dnscrypt-proxy service and maintain the registry.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DnsCryptProxyManager ( DnsCryptProxyType dnsCryptProxyType = DnsCryptProxyType.Primary ) : System

Initialize a new DnsCryptProxyManager instance.

FixImagePath ( DnsCryptProxyType dnsCryptProxyType ) : void

Add quotation marks for existing installations. This fixes a vulnerability, where the dnscrypt-proxy path contains spaces.

Thanks to @rugk!

Install ( ) : ProcessResult

Install the dnscrypt-proxy service.

IsDnsCryptProxyInstalled ( ) : bool

Check if the DNSCrypt proxy service is installed.

IsDnsCryptProxyRunning ( ) : bool

Check if the DNSCrypt proxy service is running.

ReadRegistry ( DnsCryptProxyType dnsCryptProxyType ) : void

Read the current registry values.

Restart ( ) : bool

Restart the dnscrypt-proxy service.

Start ( ) : bool

Start the dnscrypt-proxy service.

Stop ( ) : bool

Stop the dnscrypt-proxy service.

Uninstall ( ) : ProcessResult

Uninstall the dnscrypt-proxy service.

WriteRegistry ( DnsCryptProxyType dnsCryptProxyType ) : bool

Write the data to the registry.

Описание методов

DnsCryptProxyManager() публичный Метод

Initialize a new DnsCryptProxyManager instance.
public DnsCryptProxyManager ( DnsCryptProxyType dnsCryptProxyType = DnsCryptProxyType.Primary ) : System
dnsCryptProxyType DnsCryptProxyType
Результат System

FixImagePath() публичный Метод

Add quotation marks for existing installations. This fixes a vulnerability, where the dnscrypt-proxy path contains spaces.
Thanks to @rugk!
public FixImagePath ( DnsCryptProxyType dnsCryptProxyType ) : void
dnsCryptProxyType DnsCryptProxyType
Результат void

Install() публичный Метод

Install the dnscrypt-proxy service.
public Install ( ) : ProcessResult
Результат ProcessResult

IsDnsCryptProxyInstalled() публичный Метод

Check if the DNSCrypt proxy service is installed.
An error occurred when accessing a system API.
public IsDnsCryptProxyInstalled ( ) : bool
Результат bool

IsDnsCryptProxyRunning() публичный Метод

Check if the DNSCrypt proxy service is running.
public IsDnsCryptProxyRunning ( ) : bool
Результат bool

ReadRegistry() публичный Метод

Read the current registry values.
public ReadRegistry ( DnsCryptProxyType dnsCryptProxyType ) : void
dnsCryptProxyType DnsCryptProxyType Type of the proxy (primary or secondary)
Результат void

Restart() публичный Метод

Restart the dnscrypt-proxy service.
public Restart ( ) : bool
Результат bool

Start() публичный Метод

Start the dnscrypt-proxy service.
public Start ( ) : bool
Результат bool

Stop() публичный Метод

Stop the dnscrypt-proxy service.
public Stop ( ) : bool
Результат bool

Uninstall() публичный Метод

Uninstall the dnscrypt-proxy service.
public Uninstall ( ) : ProcessResult
Результат ProcessResult

WriteRegistry() публичный Метод

Write the data to the registry.
public WriteRegistry ( DnsCryptProxyType dnsCryptProxyType ) : bool
dnsCryptProxyType DnsCryptProxyType Type of the proxy (primary or secondary)
Результат bool