2008-04-26 17:55:16 +00:00
|
|
|
-- ToDo: Translate, Add descriptions and help texts
|
2008-05-25 17:00:30 +00:00
|
|
|
require("luci.model.uci")
|
2008-04-26 17:55:16 +00:00
|
|
|
|
|
|
|
m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]])
|
|
|
|
|
2008-04-26 21:29:14 +00:00
|
|
|
s = m:section(NamedSection, "general", "core", "Allgemein")
|
2009-11-25 02:20:09 +00:00
|
|
|
s.addremove = false
|
|
|
|
|
2008-04-26 21:29:14 +00:00
|
|
|
s:option(Value, "leasetime", "Freigabezeit", "h")
|
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
s:option(Value, "limit_up", "Upload-Limitierung", "Kilobyte/s - limitiert die Upload-Geschwindigkeit von Clients")
|
|
|
|
s:option(Value, "limit_down", "Download-Limitierung", "Kilobyte/s - limitiert die Download-Geschwindigkeit von Clients")
|
2009-06-10 23:39:40 +00:00
|
|
|
|
|
|
|
s:option(DummyValue, "_tmp", "",
|
|
|
|
"Bandbreitenlimitierung für Clients wird aktiviert wenn sowohl Up- als auch " ..
|
|
|
|
"Download-Geschwindigkeit angegeben werden. Auf 0 setzen um die Limitierung zu deaktivieren. " ..
|
|
|
|
"Clients in der Whitelist werden nicht limitiert.")
|
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
s = m:section(TypedSection, "iface", "Schnittstellen",
|
|
|
|
"Bestimmt die Schnittstellen auf denen Splashing aktiviert werden soll. " ..
|
|
|
|
"Diese Einstellungen müssen normalerweise nicht angepasst werden.")
|
|
|
|
|
2008-07-25 22:15:18 +00:00
|
|
|
s.template = "cbi/tblsection"
|
2008-04-26 17:55:16 +00:00
|
|
|
s.addremove = true
|
|
|
|
s.anonymous = true
|
|
|
|
|
2008-08-26 23:00:44 +00:00
|
|
|
local uci = luci.model.uci.cursor()
|
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
zone = s:option(ListValue, "zone", "Firewallzone",
|
|
|
|
"Splash-Regeln in der angegebenen Zone eingliedern")
|
|
|
|
|
2008-08-26 23:00:44 +00:00
|
|
|
uci:foreach("firewall", "zone",
|
2008-06-05 19:16:38 +00:00
|
|
|
function (section)
|
2008-08-07 20:21:38 +00:00
|
|
|
zone:value(section.name)
|
2008-06-05 19:16:38 +00:00
|
|
|
end)
|
2008-08-05 12:58:20 +00:00
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
iface = s:option(ListValue, "network", "Netzwerk",
|
|
|
|
"Client-Verkehr auf der angegebenen Schnittstelle abfangen")
|
|
|
|
|
2008-08-26 23:00:44 +00:00
|
|
|
uci:foreach("network", "interface",
|
2008-08-07 20:21:38 +00:00
|
|
|
function (section)
|
|
|
|
if section[".name"] ~= "loopback" then
|
|
|
|
iface:value(section[".name"])
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
2008-08-26 23:00:44 +00:00
|
|
|
uci:foreach("network", "alias",
|
2008-08-07 20:21:38 +00:00
|
|
|
function (section)
|
|
|
|
iface:value(section[".name"])
|
|
|
|
end)
|
2008-04-26 17:55:16 +00:00
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
|
|
|
|
s = m:section(TypedSection, "whitelist", "Whitelist",
|
|
|
|
"MAC-Adressen in dieser Liste werden automatisch freigegeben und unterliegen " ..
|
|
|
|
"keiner Bandbreitenlimitierung.")
|
|
|
|
|
2008-07-25 22:15:18 +00:00
|
|
|
s.template = "cbi/tblsection"
|
2008-04-26 17:55:16 +00:00
|
|
|
s.addremove = true
|
|
|
|
s.anonymous = true
|
|
|
|
s:option(Value, "mac", "MAC-Adresse")
|
|
|
|
|
2009-06-16 21:41:29 +00:00
|
|
|
|
|
|
|
s = m:section(TypedSection, "blacklist", "Blacklist",
|
|
|
|
"MAC-Adressen in dieser Liste werden automatisch gesperrt. Verkehr von diesen " ..
|
|
|
|
"Adressen wird komplett verworfen und es wird kein Verbindungsaufbau via WLAN " ..
|
|
|
|
"zugelassen.")
|
|
|
|
|
2008-07-25 22:15:18 +00:00
|
|
|
s.template = "cbi/tblsection"
|
2008-04-26 17:55:16 +00:00
|
|
|
s.addremove = true
|
|
|
|
s.anonymous = true
|
|
|
|
s:option(Value, "mac", "MAC-Adresse")
|
2009-06-16 21:41:29 +00:00
|
|
|
|
|
|
|
s = m:section(TypedSection, "subnet", "Freigegebene Subnetze",
|
|
|
|
"Hier eingetragene Subnetze oder Host-Adressen sind vom Splash-Vorgang ausgenommen.")
|
|
|
|
|
|
|
|
s.template = "cbi/tblsection"
|
|
|
|
s.addremove = true
|
|
|
|
s.anonymous = true
|
|
|
|
s:option(Value, "ipaddr", "IP-Adresse")
|
|
|
|
s:option(Value, "netmask", "Netzmaske", "optional bei Host-Adressen").rmempty = true
|
|
|
|
|
2008-04-26 17:55:16 +00:00
|
|
|
|
2009-06-10 23:39:40 +00:00
|
|
|
return m
|