DNSCrypt Proxy Plugin

ServiceController extends ApiMutableServiceControllerBase
in package

An ApiMutableServiceControllerBase based class which is used to control the dnscrypt-proxy service.

Table of Contents

$internalServiceClass  : string
Reference the model class, which is used to determine if this service is enabled (links the model to the service)
$internalServiceEnabled  : string
Which section of the model contains a boolean defining if the service is enabled (settings.enabled)
$internalServiceName  : string
Refers to the action template, where it can find start/stop/restart/status/reload actions (actions_helloworld.conf)
$internalServiceTemplate  : string
Before starting the service it will call configd to generate configuration data, in this case it would execute the equivalent of configctl template reload OPNsense/HelloWorld on the console
reconfigureAction()  : array<string|int, mixed>
This function creates an API endpoint for the reconfigure action.

Properties

$internalServiceClass

Reference the model class, which is used to determine if this service is enabled (links the model to the service)

protected static string $internalServiceClass = '\OPNsense\Dnscryptproxy\Settings'

$internalServiceEnabled

Which section of the model contains a boolean defining if the service is enabled (settings.enabled)

protected static string $internalServiceEnabled = 'enabled'

$internalServiceName

Refers to the action template, where it can find start/stop/restart/status/reload actions (actions_helloworld.conf)

protected static string $internalServiceName = 'dnscryptproxy'

$internalServiceTemplate

Before starting the service it will call configd to generate configuration data, in this case it would execute the equivalent of configctl template reload OPNsense/HelloWorld on the console

protected static string $internalServiceTemplate = 'OPNsense/Dnscryptproxy'

Methods

reconfigureAction()

This function creates an API endpoint for the reconfigure action.

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

API endpoint: /api/dnscryptproxy/service/reconfigure

This action is used to perform extra activites after a reconfigure action is complete. We pass on the reconfigure result from the parent.

Return values
array<string|int, mixed>

reconfigure() result or error message from configd.

Search results