2 LuCI - Lua Configuration Interface
4 Copyright 2008 Aleksandar Krsteski <alekrsteski@gmail.com>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("polipo", translate("Polipo"),
16 translate("Polipo is a small and fast caching web proxy."))
19 s = m:section(NamedSection, "general", "polipo", translate("Proxy"))
21 s:tab("general", translate("General Settings"))
22 s:tab("dns", translate("DNS and Query Settings"))
23 s:tab("proxy", translate("Parent Proxy"))
24 s:tab("logging", translate("Logging and RAM"))
27 s:taboption("general", Flag, "enabled", translate("enable"))
29 o = s:taboption("general", Value, "proxyAddress", translate("Listen address"),
30 translate("The interface on which Polipo will listen. To listen on all " ..
31 "interfaces use 0.0.0.0 or :: (IPv6)."))
33 o.placeholder = "0.0.0.0"
37 o = s:taboption("general", Value, "proxyPort", translate("Listen port"),
38 translate("Port on which Polipo will listen"))
41 o.placeholder = "8123"
45 o = s:taboption("general", DynamicList, "allowedClients",
46 translate("Allowed clients"),
47 translate("When listen address is set to 0.0.0.0 or :: (IPv6), you must " ..
48 "list clients that are allowed to connect. The format is IP address " ..
49 "or network address (192.168.1.123, 192.168.1.0/24, " ..
50 "2001:660:116::/48 (IPv6))"))
53 o.placeholder = "0.0.0.0/0"
57 dns = s:taboption("dns", Value, "dnsNameServer", translate("DNS server address"),
58 translate("Set the DNS server address to use, if you want Polipo to use " ..
59 "different DNS server than the host system."))
62 dns.datatype = "ipaddr"
64 l = s:taboption("dns", ListValue, "dnsQueryIPv6",
65 translate("Query DNS for IPv6"))
68 l:value("true", translate("Query only IPv6"))
69 l:value("happily", translate("Query IPv4 and IPv6, prefer IPv6"))
70 l:value("reluctantly", translate("Query IPv4 and IPv6, prefer IPv4"))
71 l:value("false", translate("Do not query IPv6"))
74 l = s:taboption("dns", ListValue, "dnsUseGethostbyname",
75 translate("Query DNS by hostname"))
77 l.default = "reluctantly"
78 l:value("true", translate("Always use system DNS resolver"))
80 translate("Query DNS directly, for unknown hosts fall back " ..
81 "to system resolver"))
82 l:value("reluctantly",
83 translate("Query DNS directly, fallback to system resolver"))
84 l:value("false", translate("Never use system DNS resolver"))
88 o = s:taboption("proxy", Value, "parentProxy",
89 translate("Parent proxy address"),
90 translate("Parent proxy address (in host:port format), to which Polipo " ..
91 "will forward the requests."))
97 o = s:taboption("proxy", Value, "parentAuthCredentials",
98 translate("Parent proxy authentication"),
99 translate("Basic HTTP authentication supported. Provide username and " ..
100 "password in username:password format."))
103 o.placeholder = "username:password"
107 s:taboption("logging", Flag, "logSyslog", translate("Log to syslog"))
109 s:taboption("logging", Value, "logFacility",
110 translate("Syslog facility")):depends("logSyslog", "1")
113 v = s:taboption("logging", Value, "logFile",
114 translate("Log file location"),
115 translate("Use of external storage device is recommended, because the " ..
116 "log file is written frequently and can grow considerably."))
118 v:depends("logSyslog", "")
122 o = s:taboption("logging", Value, "chunkHighMark",
123 translate("In RAM cache size (in bytes)"),
124 translate("How much RAM should Polipo use for its cache."))
126 o.datatype = "uinteger"
129 -- Disk cache section
130 s = m:section(NamedSection, "cache", "polipo", translate("On-Disk Cache"))
131 s:tab("general", translate("General Settings"))
132 s:tab("advanced", translate("Advanced Settings"))
135 -- Disk cache settings
136 s:taboption("general", Value, "diskCacheRoot", translate("Disk cache location"),
137 translate("Location where polipo will cache files permanently. Use of " ..
138 "external storage devices is recommended, because the cache can " ..
139 "grow considerably. Leave it empty to disable on-disk " ..
140 "cache.")).rmempty = true
143 s:taboption("general", Flag, "cacheIsShared", translate("Shared cache"),
144 translate("Enable if cache (proxy) is shared by multiple users."))
147 o = s:taboption("advanced", Value, "diskCacheTruncateSize",
148 translate("Truncate cache files size (in bytes)"),
149 translate("Size to which cached files should be truncated"))
152 o.placeholder = "1048576"
153 o.datatype = "uinteger"
156 o = s:taboption("advanced", Value, "diskCacheTruncateTime",
157 translate("Truncate cache files time"),
158 translate("Time after which cached files will be truncated"))
161 o.placeholder = "4d12h"
164 o = s:taboption("advanced", Value, "diskCacheUnlinkTime",
165 translate("Delete cache files time"),
166 translate("Time after which cached files will be deleted"))
169 o.placeholder = "32d"
172 -- Poor man's multiplexing section
173 s = m:section(NamedSection, "pmm", "polipo",
174 translate("Poor Man's Multiplexing"),
175 translate("Poor Man's Multiplexing (PMM) is a technique that simulates " ..
176 "multiplexing by requesting an instance in multiple segments. It " ..
177 "tries to lower the latency caused by the weakness of HTTP " ..
178 "protocol. NOTE: some sites may not work with PMM enabled."))
180 s:option(Value, "pmmSize", translate("PMM segments size (in bytes)"),
181 translate("To enable PMM, PMM segment size must be set to some " ..
182 "positive value.")).rmempty = true
184 s:option(Value, "pmmFirstSize", translate("First PMM segment size (in bytes)"),
185 translate("Size of the first PMM segment. If not defined, it defaults " ..
186 "to twice the PMM segment size.")).rmempty = true