summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-tinyproxy/luasrc/model
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-02 17:15:49 +0000
committerSteven Barth <steven@midlink.org>2008-10-02 17:15:49 +0000
commitbf61a13e30e21f1a5355e9f5464670b628438cfc (patch)
tree577456502f31bb5ffc3f7ffa44150c9db0938017 /applications/luci-tinyproxy/luasrc/model
parentb0cbce0da2cb869ad80a365635bfca3b50f8cc9f (diff)
Added tinyproxy application
Diffstat (limited to 'applications/luci-tinyproxy/luasrc/model')
-rw-r--r--applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua81
1 files changed, 81 insertions, 0 deletions
diff --git a/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua
new file mode 100644
index 000000000..b1afb3f7e
--- /dev/null
+++ b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua
@@ -0,0 +1,81 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("tinyproxy", translate("tinyproxy"), translate("tinyproxy_desc"))
+
+s = m:section(TypedSection, "tinyproxy", translate("general"))
+s.anonymous = true
+
+s:option(Flag, "enable", translate("enable"))
+
+s:option(Value, "Port", translate("port"))
+s:option(Value, "Listen").optional = true
+s:option(Value, "Bind").optional = true
+s:option(Value, "Timeout").optional = true
+
+s:option(Value, "DefaultErrorFile").optional = true
+s:option(Value, "StatFile").optional = true
+
+s:option(Flag, "Syslog").optional = true
+f = s:option(Value, "Logfile")
+f.optional = true
+f:depends({Syslog = ""})
+
+l = s:option(ListValue, "LogLevel")
+l.optional = true
+l:value("Critical")
+l:value("Error")
+l:value("Warning")
+l:value("Notice")
+l:value("Connect")
+l:value("Info")
+
+s:option(DynamicList, "XTinyproxy").optional = true
+
+s:option(DynamicList, "Allow")
+s:option(Value, "ViaProxyName")
+
+s:option(FileUpload, "Filter")
+s:option(Flag, "FilterURLs")
+s:option(Flag, "FilterExtended")
+s:option(Flag, "FilterCaseSensitive")
+s:option(Flag, "FilterDefaultDeny")
+
+s:option(DynamicList, "Anonymous")
+s:option(DynamicList, "ConnectPort")
+
+s:option(Value, "User").optional = true
+s:option(Value, "Group").optional = true
+s:option(Value, "MaxClients").optional = true
+s:option(Value, "MinSpareServers").optional = true
+s:option(Value, "MaxSpareServers").optional = true
+s:option(Value, "StartServers").optional = true
+s:option(Value, "MaxRequestsPerChild").optional = true
+
+
+s = m:section(TypedSection, "upstream")
+s.anonymous = true
+s.addremove = true
+
+t = s:option(ListValue, "type")
+t:value("proxy", translate("tinyproxy_type_proxy"))
+t:value("reject", translate("tinyproxy_type_reject"))
+
+ta = s:option(Value, "target")
+ta.rmempty = true
+
+v = s:option(Value, "via")
+v:depends({type="proxy"})
+
+return m \ No newline at end of file