1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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
|