Merge pull request #3142 from dibdot/banIP
luci-app-banip: sync with banIP 0.3.0
This commit is contained in:
commit
324f8daf31
2 changed files with 30 additions and 24 deletions
|
@ -25,8 +25,8 @@ o2 = s:option(Flag, "ban_automatic", translate("Automatic WAN Interface Detectio
|
||||||
o2.default = o2.enabled
|
o2.default = o2.enabled
|
||||||
o2.rmempty = false
|
o2.rmempty = false
|
||||||
|
|
||||||
o3 = s:option(MultiValue, "ban_iface", translate("Interface Selection"),
|
o3 = s:option(MultiValue, "ban_iface", translate("Manual WAN Interface Selection"),
|
||||||
translate("Disable the automatic WAN detection and select your preferred interface(s) manually."))
|
translate("Select your preferred interface(s) manually."))
|
||||||
if dump then
|
if dump then
|
||||||
local i, v
|
local i, v
|
||||||
for i, v in ipairs(dump.interface) do
|
for i, v in ipairs(dump.interface) do
|
||||||
|
@ -36,16 +36,14 @@ if dump then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
o3:depends("ban_automatic", 0)
|
||||||
o3.widget = "checkbox"
|
o3.widget = "checkbox"
|
||||||
o3.rmempty = false
|
o3.rmempty = true
|
||||||
|
|
||||||
o4 = s:option(ListValue, "ban_fetchutil", translate("Download Utility"),
|
o4 = s:option(Flag, "ban_realtime", translate("SSH/LuCI RT Monitor"),
|
||||||
translate("List of supported and fully pre-configured download utilities."))
|
translate("Starts a small log/banIP monitor in the background to block SSH/LuCI brute force attacks in realtime."))
|
||||||
o4:value("uclient-fetch")
|
o4.enabled = "true"
|
||||||
o4:value("wget")
|
o4.default = o4.disabled
|
||||||
o4:value("curl")
|
|
||||||
o4:value("aria2c")
|
|
||||||
o4.default = "uclient-fetch"
|
|
||||||
o4.rmempty = false
|
o4.rmempty = false
|
||||||
|
|
||||||
-- Runtime Information
|
-- Runtime Information
|
||||||
|
@ -125,23 +123,31 @@ e7.rmempty = true
|
||||||
|
|
||||||
-- Optional Extra Options
|
-- Optional Extra Options
|
||||||
|
|
||||||
e20 = e:option(Value, "ban_triggerdelay", translate("Trigger Delay"),
|
e20 = e:option(ListValue, "ban_fetchutil", translate("Download Utility"),
|
||||||
translate("Additional trigger delay in seconds before banIP processing begins."))
|
translate("Select your preferred download utility."))
|
||||||
e20.default = 2
|
e20:value("uclient-fetch")
|
||||||
e20.datatype = "range(1,60)"
|
e20:value("wget")
|
||||||
|
e20:value("curl")
|
||||||
|
e20:value("aria2c")
|
||||||
e20.optional = true
|
e20.optional = true
|
||||||
|
|
||||||
e21 = e:option(ListValue, "ban_starttype", translate("Start Type"),
|
e21 = e:option(Value, "ban_fetchparm", translate("Download Options"),
|
||||||
translate("Select the used start type during boot."))
|
translate("Special options for the selected download utility, e.g. '--timeout=20 -O'."))
|
||||||
e21:value("start")
|
|
||||||
e21:value("reload")
|
|
||||||
e21.default = "start"
|
|
||||||
e21.optional = true
|
e21.optional = true
|
||||||
|
|
||||||
e22 = e:option(Value, "ban_fetchparm", translate("Download Options"),
|
e22 = e:option(Value, "ban_triggerdelay", translate("Trigger Delay"),
|
||||||
translate("Special options for the selected download utility, e.g. '--timeout=20 --no-check-certificate -O'."))
|
translate("Additional trigger delay in seconds before banIP processing begins."))
|
||||||
|
e22.default = 2
|
||||||
|
e22.datatype = "range(1,60)"
|
||||||
e22.optional = true
|
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 = e:option(Value, "ban_wan_input_chain", translate("WAN Input Chain IPv4"))
|
||||||
e30.default = "input_wan_rule"
|
e30.default = "input_wan_rule"
|
||||||
e30.datatype = "uciname"
|
e30.datatype = "uciname"
|
||||||
|
|
|
@ -32,7 +32,7 @@ This is free software, licensed under the Apache License, Version 2.0
|
||||||
input = json.data.version;
|
input = json.data.version;
|
||||||
view.innerHTML = input || "-";
|
view.innerHTML = input || "-";
|
||||||
view = document.getElementById("value_3");
|
view = document.getElementById("value_3");
|
||||||
input = json.data.fetch_info;
|
input = json.data.util_info;
|
||||||
view.innerHTML = input || "-";
|
view.innerHTML = input || "-";
|
||||||
view = document.getElementById("value_4");
|
view = document.getElementById("value_4");
|
||||||
input = json.data.ipset_info;
|
input = json.data.ipset_info;
|
||||||
|
@ -123,7 +123,7 @@ function btn_action(action)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value" id="status_3">
|
<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">
|
<div class="cbi-value-field">
|
||||||
<span class="runtime" id="value_3">-</span>
|
<span class="runtime" id="value_3">-</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue