aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound.inc9
-rw-r--r--config/unbound/unbound_advanced.xml8
2 files changed, 17 insertions, 0 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index ebe8fbdf..8d33e456 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -477,6 +477,15 @@ control-cert-file: "/usr/local/etc/unbound/unbound_control.pem"
EOD;
+ # Handle custom options
+ if(!empty($unbound_config['custom_options'])) {
+ $custom_options = explode(";", ($unbound_config['custom_options']));
+ $unbound_conf .= "# Unbound Custom options\n";
+ foreach ($custom_options as $ent) {
+ $unbound_conf .= $ent."\n";
+ }
+ }
+
file_put_contents("/usr/local/etc/unbound/unbound.conf", $unbound_conf);
}
diff --git a/config/unbound/unbound_advanced.xml b/config/unbound/unbound_advanced.xml
index b24b18ba..03ba8157 100644
--- a/config/unbound/unbound_advanced.xml
+++ b/config/unbound/unbound_advanced.xml
@@ -302,6 +302,14 @@
</options>
<advancedfield/>
</field>
+ <field>
+ <fielddescr>Custom Options</fielddescr>
+ <fieldname>custom_options</fieldname>
+ <description>You can put your own custom options here, separated by semi-colons (;). These configurations options will then be added to the configuration file. &lt;br/&gt; &lt;b&gt;Note:&lt;/b&gt; They need to be Unbound native configuration options, otherwise Unbound will &lt;b&gt;not&lt;/b&gt; work.</description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>5</rows>
+ </field>
</fields>
<custom_add_php_command>
</custom_add_php_command>