blob: c97f0820bc84dde13763a023a1b1b39f2183a7f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{% if not cfg.lua.script_only %}
-- FFI library
ffi = require('ffi')
local C = ffi.C
-- Do not clear the DB with rules; we had it prepared by a different process.
assert(C.kr_rules_init(nil, 0, false) == 0)
-- hostname
hostname('{{ cfg.hostname }}')
{% if cfg.nsid %}
-- nsid
modules.load('nsid')
nsid.name('{{ cfg.nsid }}' .. worker.id)
{% endif %}
-- LOGGING section ----------------------------------
{% include "logging.lua.j2" %}
-- MONITORING section -------------------------------
{% include "monitoring.lua.j2" %}
-- WEBMGMT section ----------------------------------
{% include "webmgmt.lua.j2" %}
-- OPTIONS section ----------------------------------
{% include "options.lua.j2" %}
-- NETWORK section ----------------------------------
{% include "network.lua.j2" %}
-- DNSSEC section -----------------------------------
{% include "dnssec.lua.j2" %}
-- FORWARD section ----------------------------------
{% include "forward.lua.j2" %}
-- CACHE section ------------------------------------
{% include "cache.lua.j2" %}
-- DNS64 section ------------------------------------
{% include "dns64.lua.j2" %}
-- RATE-LIMITING section ------------------------------------
{% include "rate_limiting.lua.j2" %}
{% endif %}
-- LUA section --------------------------------------
-- Custom Lua code cannot be validated
{% if cfg.lua.script_file %}
{% import cfg.lua.script_file as script_file %}
{{ script_file }}
{% endif %}
{% if cfg.lua.script %}
{{ cfg.lua.script }}
{% endif %}
|