mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
dnsmasq: no hosts option; closes #5374
* Add checkbox to enable --no-hosts command line option
This commit is contained in:
parent
2fdaab1552
commit
dedb117935
@ -184,6 +184,10 @@ function dnsmasq_configure_do($verbose = false)
|
||||
$args .= ' --log-queries=extra ';
|
||||
}
|
||||
|
||||
if (isset($config['dnsmasq']['no_hosts'])) {
|
||||
$args .= ' --no-hosts ';
|
||||
}
|
||||
|
||||
$args .= ' --dns-forward-max=5000 ';
|
||||
$args .= ' --cache-size=10000 ';
|
||||
$args .= ' --local-ttl=1 ';
|
||||
|
||||
@ -49,6 +49,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$pconfig['strictbind'] = isset($a_dnsmasq['strictbind']);
|
||||
$pconfig['dnssec'] = isset($a_dnsmasq['dnssec']);
|
||||
$pconfig['log_queries'] = isset($a_dnsmasq['log_queries']);
|
||||
$pconfig['no_hosts'] = isset($a_dnsmasq['no_hosts']);
|
||||
// simple text types
|
||||
$pconfig['port'] = !empty($a_dnsmasq['port']) ? $a_dnsmasq['port'] : "";
|
||||
// arrays
|
||||
@ -81,6 +82,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$a_dnsmasq['domain_needed'] = !empty($pconfig['domain_needed']);
|
||||
$a_dnsmasq['no_private_reverse'] = !empty($pconfig['no_private_reverse']);
|
||||
$a_dnsmasq['log_queries'] = !empty($pconfig['log_queries']);
|
||||
$a_dnsmasq['no_hosts'] = !empty($pconfig['no_hosts']);
|
||||
$a_dnsmasq['strictbind'] = !empty($pconfig['strictbind']);
|
||||
$a_dnsmasq['dnssec'] = !empty($pconfig['dnssec']);
|
||||
if (!empty($pconfig['regdhcpdomain'])) {
|
||||
@ -355,6 +357,13 @@ $( document ).ready(function() {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('No Hosts Lookup') ?></td>
|
||||
<td>
|
||||
<input name="no_hosts" type="checkbox" id="no_hosts" value="yes" <?= !empty($pconfig['no_hosts']) ? 'checked="checked"' : '' ?> />
|
||||
<?= gettext('Don\'t read the hostnames in /etc/hosts.') ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Log Queries') ?></td>
|
||||
<td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user