C# Class SimpleDnsCrypt.Tools.DnsCryptProxyManager

Class to manage the dnscrypt-proxy service and maintain the registry.
Afficher le fichier Open project: bitbeans/SimpleDnsCrypt Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

DnsCryptProxyManager() public méthode

Initialize a new DnsCryptProxyManager instance.
public DnsCryptProxyManager ( DnsCryptProxyType dnsCryptProxyType = DnsCryptProxyType.Primary ) : System
dnsCryptProxyType DnsCryptProxyType
Résultat System

FixImagePath() public méthode

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
Résultat void

Install() public méthode

Install the dnscrypt-proxy service.
public Install ( ) : ProcessResult
Résultat ProcessResult

IsDnsCryptProxyInstalled() public méthode

Check if the DNSCrypt proxy service is installed.
An error occurred when accessing a system API.
public IsDnsCryptProxyInstalled ( ) : bool
Résultat bool

IsDnsCryptProxyRunning() public méthode

Check if the DNSCrypt proxy service is running.
public IsDnsCryptProxyRunning ( ) : bool
Résultat bool

ReadRegistry() public méthode

Read the current registry values.
public ReadRegistry ( DnsCryptProxyType dnsCryptProxyType ) : void
dnsCryptProxyType DnsCryptProxyType Type of the proxy (primary or secondary)
Résultat void

Restart() public méthode

Restart the dnscrypt-proxy service.
public Restart ( ) : bool
Résultat bool

Start() public méthode

Start the dnscrypt-proxy service.
public Start ( ) : bool
Résultat bool

Stop() public méthode

Stop the dnscrypt-proxy service.
public Stop ( ) : bool
Résultat bool

Uninstall() public méthode

Uninstall the dnscrypt-proxy service.
public Uninstall ( ) : ProcessResult
Résultat ProcessResult

WriteRegistry() public méthode

Write the data to the registry.
public WriteRegistry ( DnsCryptProxyType dnsCryptProxyType ) : bool
dnsCryptProxyType DnsCryptProxyType Type of the proxy (primary or secondary)
Résultat bool