1 -- Copyright 2016 Openwrt.org
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("adblock", translate("Adblock"),
5 translate("Configuration of the adblock package to block ad/abuse domains by using DNS."))
9 s = m:section(NamedSection, "global", "adblock", translate("Global options"))
11 o1 = s:option(Flag, "adb_enabled", translate("Enable adblock"))
15 o2 = s:option(Value, "adb_blacklist", translate("Blacklist file"),
16 translate("File with explicitly blacklisted hosts/domains."))
20 o3 = s:option(Value, "adb_whitelist", translate("Whitelist file"),
21 translate("File with whitelisted hosts/domains that are allowed despite being on a blocklist."))
27 bl = m:section(TypedSection, "source", translate("Blocklist sources"),
28 translate("Available blocklist sources (")
29 .. [[<a href="https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md" target="_blank">]]
30 .. translate("see list details")
32 .. translate("). Note that list URLs and Shallalist category selections are not configurable via Luci."))
33 bl.template = "cbi/tblsection"
35 name = bl:option(Flag, "enabled", translate("Enabled"))
38 des = bl:option(DummyValue, "adb_srcdesc", translate("Description"))
43 s2 = m:section(NamedSection, "backup", "service", translate("Backup options"))
45 o4 = s2:option(Flag, "enabled", translate("Enable blocklist backup"))
49 o5 = s2:option(Value, "adb_backupdir", translate("Backup directory"))
51 o5.datatype = "directory"
53 s3 = m:section(NamedSection, "log", "service", translate("Log options"))
55 o6 = s3:option(Flag, "enabled", translate("Enable log"))
59 o7 = s3:option(Value, "adb_logfile", translate("Log file"))
61 o7.datatype = "string"
65 e = m:section(NamedSection, "global", "adblock", translate("Extra options"),
66 translate("Options for further tweaking in case the defaults are not suitable for you."))
68 a1 = e:option(Value, "adb_port", translate("Port of the adblock uhttpd instance"))
74 a2 = e:option(Value, "adb_nullipv4", translate("IPv4 blackhole ip address"))
77 a2.default = "192.0.2.1"
78 a2.datatype = "ip4addr"
80 a3 = e:option(Value, "adb_nullipv6", translate("IPv6 blackhole ip address"))
83 a3.default = "::ffff:c000:0201"
84 a3.datatype = "ip6addr"
86 a6 = e:option(Value, "adb_wanif", translate("Name of the logical wan interface"))
90 a6.datatype = "network"
92 a7 = e:option(Value, "adb_lanif", translate("Name of the logical lan interface"))
96 a7.datatype = "network"