DNSCrypt Proxy Plugin

DiagnosticsController extends ApiControllerBase
in package

An ApiControllerBase class used to perform various diagnostics for dnscrypt-proxy.

This class includes the following API actions:

command

This API is accessible at the following URL endpoint:

/api/dnscryptproxy/diagnostics

Table of Contents

commandAction()  : array<string|int, mixed>
An API endpoint to execute pre-defined diagnostic commands.
indexAction()  : array<string|int, mixed>
Function indexAction() is an API endpoint to call when no parameters are provided for the API. Can be used to test the is working.

Methods

commandAction()

An API endpoint to execute pre-defined diagnostic commands.

public commandAction( $target) : array<string|int, mixed>

API endpoint: /api/dnscryptproxy/diagnostics/command

Usage: /api/dnscryptproxy/diagnostics/command/show-certs

Commands are accessible via the API call by including the desired command after the API endpoint in the URL. The example above calls commandAction() with the $target being "show-certs".

The commands available are: resolve show-certs config-check

Parameters
$target :

string command to execute, pre-defined in the function

Return values
array<string|int, mixed>

status, response (command output), maybe message

indexAction()

Function indexAction() is an API endpoint to call when no parameters are provided for the API. Can be used to test the is working.

public indexAction() : array<string|int, mixed>

API endpoint: /api/dnscryptproxy/diagnostics

Usage: /api/dnscryptproxy/diagnostics

Returns an array which gets converted to json.

Return values
array<string|int, mixed>

includes status, saying everything is A-OK

Search results