luci-app-banip: sync with banIP 0.3.0

* see package PR for details

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2019-10-04 09:21:11 +02:00
parent 68190f43ca
commit 8343e58d7f
No known key found for this signature in database
GPG key ID: 9D71CD547BFAE684
2 changed files with 30 additions and 24 deletions

View file

@ -25,8 +25,8 @@ o2 = s:option(Flag, "ban_automatic", translate("Automatic WAN Interface Detectio
o2.default = o2.enabled
o2.rmempty = false
o3 = s:option(MultiValue, "ban_iface", translate("Interface Selection"),
translate("Disable the automatic WAN detection and select your preferred interface(s) manually."))
o3 = s:option(MultiValue, "ban_iface", translate("Manual WAN Interface Selection"),
translate("Select your preferred interface(s) manually."))
if dump then
local i, v
for i, v in ipairs(dump.interface) do
@ -36,16 +36,14 @@ if dump then
end
end
end
o3:depends("ban_automatic", 0)
o3.widget = "checkbox"
o3.rmempty = false
o3.rmempty = true
o4 = s:option(ListValue, "ban_fetchutil", translate("Download Utility"),
translate("List of supported and fully pre-configured download utilities."))
o4:value("uclient-fetch")
o4:value("wget")
o4:value("curl")
o4:value("aria2c")
o4.default = "uclient-fetch"
o4 = s:option(Flag, "ban_realtime", translate("SSH/LuCI RT Monitor"),
translate("Starts a small log/banIP monitor in the background to block SSH/LuCI brute force attacks in realtime."))
o4.enabled = "true"
o4.default = o4.disabled
o4.rmempty = false
-- Runtime Information
@ -125,23 +123,31 @@ e7.rmempty = true
-- Optional Extra Options
e20 = e:option(Value, "ban_triggerdelay", translate("Trigger Delay"),
translate("Additional trigger delay in seconds before banIP processing begins."))
e20.default = 2
e20.datatype = "range(1,60)"
e20 = e:option(ListValue, "ban_fetchutil", translate("Download Utility"),
translate("Select your preferred download utility."))
e20:value("uclient-fetch")
e20:value("wget")
e20:value("curl")
e20:value("aria2c")
e20.optional = true
e21 = e:option(ListValue, "ban_starttype", translate("Start Type"),
translate("Select the used start type during boot."))
e21:value("start")
e21:value("reload")
e21.default = "start"
e21 = e:option(Value, "ban_fetchparm", translate("Download Options"),
translate("Special options for the selected download utility, e.g. '--timeout=20 -O'."))
e21.optional = true
e22 = e:option(Value, "ban_fetchparm", translate("Download Options"),
translate("Special options for the selected download utility, e.g. '--timeout=20 --no-check-certificate -O'."))
e22 = e:option(Value, "ban_triggerdelay", translate("Trigger Delay"),
translate("Additional trigger delay in seconds before banIP processing begins."))
e22.default = 2
e22.datatype = "range(1,60)"
e22.optional = true
e23 = e:option(ListValue, "ban_starttype", translate("Start Type"),
translate("Select the used start type during boot."))
e23:value("start")
e23:value("reload")
e23.default = "start"
e23.optional = true
e30 = e:option(Value, "ban_wan_input_chain", translate("WAN Input Chain IPv4"))
e30.default = "input_wan_rule"
e30.datatype = "uciname"

View file

@ -32,7 +32,7 @@ This is free software, licensed under the Apache License, Version 2.0
input = json.data.version;
view.innerHTML = input || "-";
view = document.getElementById("value_3");
input = json.data.fetch_info;
input = json.data.util_info;
view.innerHTML = input || "-";
view = document.getElementById("value_4");
input = json.data.ipset_info;
@ -123,7 +123,7 @@ function btn_action(action)
</div>
</div>
<div class="cbi-value" id="status_3">
<label class="cbi-value-title" for="status_3"><%:Download Utility (SSL Library)%></label>
<label class="cbi-value-title" for="status_3"><%:Download Utility, RT Monitor%></label>
<div class="cbi-value-field">
<span class="runtime" id="value_3">-</span>
</div>