mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-08 16:34:18 -04:00
dns/dnscrypt-proxy: add logging to UI (#1131)
This commit is contained in:
parent
3704c3b174
commit
0335ae7578
4 changed files with 43 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= dnscrypt-proxy
|
||||
PLUGIN_VERSION= 1.1
|
||||
PLUGIN_VERSION= 1.2
|
||||
PLUGIN_COMMENT= Flexible DNS proxy supporting DNSCrypt and DoH
|
||||
PLUGIN_DEPENDS= dnscrypt-proxy2
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -1,4 +1,21 @@
|
|||
A flexible DNS proxy, with support for modern encrypted DNS protocols
|
||||
such as DNSCrypt v2 and DNS-over-HTTPS.
|
||||
|
||||
|
||||
Plugin Changelog
|
||||
================
|
||||
|
||||
1.2
|
||||
|
||||
* Add logging to menu
|
||||
|
||||
1.1
|
||||
|
||||
* Allow manual server addition and selection
|
||||
|
||||
1.0
|
||||
|
||||
* Initial release
|
||||
|
||||
|
||||
WWW: https://github.com/jedisct1/dnscrypt-proxy
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<menu>
|
||||
<Services>
|
||||
<DNSCrypt-Proxy cssClass="fa fa-lock fa-fw" url="/ui/dnscryptproxy/general/index" />
|
||||
<DNSCrypt-Proxy cssClass="fa fa-lock fa-fw">
|
||||
<Configuration url="/ui/dnscryptproxy/general/index" order="10"/>
|
||||
<Log VisibleName="Log File" url="/diag_logs_dnscrypt.php?type=dnscrypt-proxy" order="20">
|
||||
<More url="/diag_logs_dnscrypt.php*" visibility="hidden"/>
|
||||
</Log>
|
||||
</DNSCrypt-Proxy>
|
||||
</Services>
|
||||
</menu>
|
||||
|
|
|
|||
19
dns/dnscrypt-proxy/src/www/diag_logs_dnscrypt.php
Normal file
19
dns/dnscrypt-proxy/src/www/diag_logs_dnscrypt.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
$type = 'dnscrypt-proxy';
|
||||
if (isset($_GET['type']) && ($_GET['type'] === 'dnscrypt-proxy' || $_GET['type'] === 'query' || $_GET['type'] === 'nx')) {
|
||||
$type = $_GET['type'];
|
||||
}
|
||||
|
||||
$logfile = "/var/log/dnscrypt-proxy/{$type}.log";
|
||||
$logclog = false;
|
||||
$logsplit = 2;
|
||||
|
||||
$logpills = array();
|
||||
$logpills[] = array(gettext('General'), true, '/diag_logs_dnscrypt.php?type=dnscrypt-proxy');
|
||||
$logpills[] = array(gettext('Queries'), false, '/diag_logs_dnscrypt.php?type=query');
|
||||
$logpills[] = array(gettext('NX'), false, '/diag_logs_dnscrypt.php?type=nx');
|
||||
|
||||
$service_hook = 'dnscrypt-proxy';
|
||||
|
||||
require_once 'diag_logs_template.inc';
|
||||
Loading…
Reference in a new issue