1 -- Copyright 2008 Aleksandar Krsteski <alekrsteski@gmail.com>
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("polipo", translate("Polipo"),
5 translate("Polipo is a small and fast caching web proxy."))
8 s = m:section(NamedSection, "general", "polipo", translate("Proxy"))
10 s:tab("general", translate("General Settings"))
11 s:tab("dns", translate("DNS and Query Settings"))
12 s:tab("proxy", translate("Parent Proxy"))
13 s:tab("logging", translate("Logging and RAM"))
16 s:taboption("general", Flag, "enabled", translate("enable"))
18 o = s:taboption("general", Value, "proxyAddress", translate("Listen address"),
19 translate("The interface on which Polipo will listen. To listen on all " ..
20 "interfaces use 0.0.0.0 or :: (IPv6)."))
22 o.placeholder = "0.0.0.0"
26 o = s:taboption("general", Value, "proxyPort", translate("Listen port"),
27 translate("Port on which Polipo will listen"))
30 o.placeholder = "8123"
34 o = s:taboption("general", DynamicList, "allowedClients",
35 translate("Allowed clients"),
36 translate("When listen address is set to 0.0.0.0 or :: (IPv6), you must " ..
37 "list clients that are allowed to connect. The format is IP address " ..
38 "or network address (192.168.1.123, 192.168.1.0/24, " ..
39 "2001:660:116::/48 (IPv6))"))
42 o.placeholder = "0.0.0.0/0"
46 dns = s:taboption("dns", Value, "dnsNameServer", translate("DNS server address"),
47 translate("Set the DNS server address to use, if you want Polipo to use " ..
48 "different DNS server than the host system."))
51 dns.datatype = "ipaddr"
53 l = s:taboption("dns", ListValue, "dnsQueryIPv6",
54 translate("Query DNS for IPv6"))
57 l:value("true", translate("Query only IPv6"))
58 l:value("happily", translate("Query IPv4 and IPv6, prefer IPv6"))
59 l:value("reluctantly", translate("Query IPv4 and IPv6, prefer IPv4"))
60 l:value("false", translate("Do not query IPv6"))
63 l = s:taboption("dns", ListValue, "dnsUseGethostbyname",
64 translate("Query DNS by hostname"))
66 l.default = "reluctantly"
67 l:value("true", translate("Always use system DNS resolver"))
69 translate("Query DNS directly, for unknown hosts fall back " ..
70 "to system resolver"))
71 l:value("reluctantly",
72 translate("Query DNS directly, fallback to system resolver"))
73 l:value("false", translate("Never use system DNS resolver"))
77 o = s:taboption("proxy", Value, "parentProxy",
78 translate("Parent proxy address"),
79 translate("Parent proxy address (in host:port format), to which Polipo " ..
80 "will forward the requests."))
86 o = s:taboption("proxy", Value, "parentAuthCredentials",
87 translate("Parent proxy authentication"),
88 translate("Basic HTTP authentication supported. Provide username and " ..
89 "password in username:password format."))
92 o.placeholder = "username:password"
96 s:taboption("logging", Flag, "logSyslog", translate("Log to syslog"))
98 s:taboption("logging", Value, "logFacility",
99 translate("Syslog facility")):depends("logSyslog", "1")
102 v = s:taboption("logging", Value, "logFile",
103 translate("Log file location"),
104 translate("Use of external storage device is recommended, because the " ..
105 "log file is written frequently and can grow considerably."))
107 v:depends("logSyslog", "")
111 o = s:taboption("logging", Value, "chunkHighMark",
112 translate("In RAM cache size (in bytes)"),
113 translate("How much RAM should Polipo use for its cache."))
115 o.datatype = "uinteger"
118 -- Disk cache section
119 s = m:section(NamedSection, "cache", "polipo", translate("On-Disk Cache"))
120 s:tab("general", translate("General Settings"))
121 s:tab("advanced", translate("Advanced Settings"))
124 -- Disk cache settings
125 s:taboption("general", Value, "diskCacheRoot", translate("Disk cache location"),
126 translate("Location where polipo will cache files permanently. Use of " ..
127 "external storage devices is recommended, because the cache can " ..
128 "grow considerably. Leave it empty to disable on-disk " ..
129 "cache.")).rmempty = true
132 s:taboption("general", Flag, "cacheIsShared", translate("Shared cache"),
133 translate("Enable if cache (proxy) is shared by multiple users."))
136 o = s:taboption("advanced", Value, "diskCacheTruncateSize",
137 translate("Truncate cache files size (in bytes)"),
138 translate("Size to which cached files should be truncated"))
141 o.placeholder = "1048576"
142 o.datatype = "uinteger"
145 o = s:taboption("advanced", Value, "diskCacheTruncateTime",
146 translate("Truncate cache files time"),
147 translate("Time after which cached files will be truncated"))
150 o.placeholder = "4d12h"
153 o = s:taboption("advanced", Value, "diskCacheUnlinkTime",
154 translate("Delete cache files time"),
155 translate("Time after which cached files will be deleted"))
158 o.placeholder = "32d"
161 -- Poor man's multiplexing section
162 s = m:section(NamedSection, "pmm", "polipo",
163 translate("Poor Man's Multiplexing"),
164 translate("Poor Man's Multiplexing (PMM) is a technique that simulates " ..
165 "multiplexing by requesting an instance in multiple segments. It " ..
166 "tries to lower the latency caused by the weakness of HTTP " ..
167 "protocol. NOTE: some sites may not work with PMM enabled."))
169 s:option(Value, "pmmSize", translate("PMM segments size (in bytes)"),
170 translate("To enable PMM, PMM segment size must be set to some " ..
171 "positive value.")).rmempty = true
173 s:option(Value, "pmmFirstSize", translate("First PMM segment size (in bytes)"),
174 translate("Size of the first PMM segment. If not defined, it defaults " ..
175 "to twice the PMM segment size.")).rmempty = true