- Removed options from declarative configuration model (YAML).
These are mostly experimental and debugging/testing options that are not useful for general users (remain in Lua):
- /logging/debugging
+ - /webmgmt
Knot Resolver 6.0.15 (2025-07-17)
"interface": null
}
},
- "webmgmt": {
- "description": "Configuration of legacy web management endpoint.",
- "type": [
- "object",
- "null"
- ],
- "properties": {
- "unix-socket": {
- "type": [
- "string",
- "null"
- ],
- "description": "Path to unix domain socket to listen to.",
- "default": null
- },
- "interface": {
- "type": [
- "string",
- "null"
- ],
- "description": "IP address or interface name with port number to listen to.",
- "default": null
- },
- "tls": {
- "type": "boolean",
- "description": "Enable/disable TLS.",
- "default": false
- },
- "cert-file": {
- "type": [
- "string",
- "null"
- ],
- "description": "Path to certificate file.",
- "default": null
- },
- "key-file": {
- "type": [
- "string",
- "null"
- ],
- "description": "Path to certificate key.",
- "default": null
- }
- },
- "default": null
- },
"options": {
"description": "Fine-tuning global parameters of DNS resolver operation.",
"type": "object",
from knot_resolver.datamodel.templates import POLICY_CONFIG_TEMPLATE, WORKER_CONFIG_TEMPLATE
from knot_resolver.datamodel.types import EscapedStr, IntPositive, WritableDir
from knot_resolver.datamodel.view_schema import ViewSchema
-from knot_resolver.datamodel.webmgmt_schema import WebmgmtSchema
from knot_resolver.utils.modeling import ConfigSchema
from knot_resolver.utils.modeling.base_schema import lazy_default
from knot_resolver.utils.modeling.exceptions import AggregateDataValidationError, DataValidationError
workers: The number of running kresd (Knot Resolver daemon) workers. If set to 'auto', it is equal to number of CPUs available.
max_workers: The maximum number of workers allowed. Cannot be changed in runtime.
management: Configuration of management HTTP API.
- webmgmt: Configuration of legacy web management endpoint.
options: Fine-tuning global parameters of DNS resolver operation.
network: Network connections and protocols configuration.
views: List of views and its configuration.
workers: Union[Literal["auto"], IntPositive] = IntPositive(1)
max_workers: IntPositive = IntPositive(WORKERS_MAX)
management: ManagementSchema = lazy_default(ManagementSchema, {"unix-socket": str(API_SOCK_FILE)})
- webmgmt: Optional[WebmgmtSchema] = None
options: OptionsSchema = OptionsSchema()
network: NetworkSchema = NetworkSchema()
views: Optional[List[ViewSchema]] = None
workers: IntPositive
max_workers: IntPositive
management: ManagementSchema
- webmgmt: Optional[WebmgmtSchema]
options: OptionsSchema
network: NetworkSchema
views: Optional[List[ViewSchema]]
+++ /dev/null
-{% from 'macros/common_macros.lua.j2' import boolean %}
-
-{% if cfg.webmgmt -%}
--- webmgmt
-modules.load('http')
-http.config({tls = {{ boolean(cfg.webmgmt.tls) }},
-{%- if cfg.webmgmt.cert_file -%}
- cert = '{{ cfg.webmgmt.cert_file }}',
-{%- endif -%}
-{%- if cfg.webmgmt.cert_file -%}
- key = '{{ cfg.webmgmt.key_file }}',
-{%- endif -%}
-}, 'webmgmt')
-net.listen(
-{%- if cfg.webmgmt.unix_socket -%}
- '{{ cfg.webmgmt.unix_socket }}',nil,
-{%- elif cfg.webmgmt.interface -%}
- {%- if cfg.webmgmt.interface.addr -%}
- '{{ cfg.webmgmt.interface.addr }}',{{ cfg.webmgmt.interface.port }},
- {%- elif cfg.webmgmt.interface.if_name -%}
- net.{{ cfg.webmgmt.interface.if_name }},{{ cfg.webmgmt.interface.port }},
- {%- endif -%}
-{%- endif -%}
-{ kind = 'webmgmt' })
-{%- endif %}
\ No newline at end of file
-- MONITORING section -------------------------------
{% include "monitoring.lua.j2" %}
--- WEBMGMT section ----------------------------------
-{% include "webmgmt.lua.j2" %}
-
-- OPTIONS section ----------------------------------
{% include "options.lua.j2" %}
+++ /dev/null
-from typing import Optional
-
-from knot_resolver.datamodel.types import InterfacePort, ReadableFile, WritableFilePath
-from knot_resolver.utils.modeling import ConfigSchema
-
-
-class WebmgmtSchema(ConfigSchema):
- """
- Configuration of legacy web management endpoint.
-
- ---
- unix_socket: Path to unix domain socket to listen to.
- interface: IP address or interface name with port number to listen to.
- tls: Enable/disable TLS.
- cert_file: Path to certificate file.
- key_file: Path to certificate key.
- """
-
- unix_socket: Optional[WritableFilePath] = None
- interface: Optional[InterfacePort] = None
- tls: bool = False
- cert_file: Optional[ReadableFile] = None
- key_file: Optional[ReadableFile] = None
-
- def _validate(self) -> None:
- if bool(self.unix_socket) == bool(self.interface):
- raise ValueError("One of 'interface' or 'unix-socket' must be configured.")
config.hostname,
config.workers,
config.max_workers,
- config.webmgmt,
config.options,
config.network,
config.forward,