Browse Source

Merge pull request #693 from chris5560/master

[luci-app-privoxy] New LuCI App to support privoxy
Steven Barth 10 years ago
parent
commit
4b93183f55

+ 69
- 0
net/privoxy-luci/Makefile View File

@@ -0,0 +1,69 @@
1
+
2
+include $(TOPDIR)/rules.mk
3
+
4
+PKG_NAME:=luci-app-privoxy
5
+PKG_VERSION:=1.0.0
6
+#PKG_RELEASE:=0
7
+
8
+PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
9
+PKG_LICENSE:=GPL-2.0
10
+PKG_LICENSE_FILES:=LICENSE
11
+
12
+PKG_BUILD_DIR:= $(BUILD_DIR)/$(PKG_NAME)
13
+
14
+# needed inside Build/Compile
15
+# po2lmo is compiled inside luci-base
16
+PKG_BUILD_DEPENDS:=+luci-base
17
+
18
+include $(INCLUDE_DIR)/package.mk
19
+
20
+define Package/luci-app-privoxy
21
+  SECTION:=luci
22
+  CATEGORY:=LuCI
23
+  SUBMENU:=3. Applications
24
+  TITLE:=LuCI support for Privoxy WEB Proxy
25
+  DEPENDS:=+luci-lib-nixio +luci-mod-admin-full +privoxy
26
+  PKGARCH:=all
27
+endef
28
+
29
+define Package/luci-app-privoxy/description
30
+LuCi web interface for Privoxy WEB Proxy
31
+Version: $(PKG_VERSION)
32
+endef
33
+
34
+define Build/Prepare
35
+	# do nothing
36
+endef
37
+
38
+define Build/Configure
39
+	# do nothing
40
+endef
41
+
42
+define Build/Compile
43
+	mkdir -p $(PKG_INSTALL_DIR)/build $(PKG_INSTALL_DIR)/files $(PKG_INSTALL_DIR)/po
44
+	# copy everthing we need ot PKG_INSTALL_DIR
45
+	$(CP) ./* $(PKG_INSTALL_DIR)/
46
+	# due to package dependencies LuCI is compiled first so the needed binary exists
47
+	$(LN) $(BUILD_DIR)/luci/build/po2lmo $(PKG_INSTALL_DIR)/build/po2lmo
48
+	$(LN) $(BUILD_DIR)/luci/build/i18n-po2lua.pl $(PKG_INSTALL_DIR)/build/i18n-po2lua.pl
49
+	# generate needed .lmo files out of given .po files
50
+	cd $(PKG_INSTALL_DIR); build/i18n-po2lua.pl po files/luasrc/i18n
51
+endef
52
+
53
+define Package/luci-app-privoxy/install
54
+	$(INSTALL_DIR) $(1)/etc/uci-defaults
55
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/files/root/etc/uci-defaults/* $(1)/etc/uci-defaults
56
+
57
+	$(INSTALL_DIR)  $(1)/usr/lib/lua/luci
58
+	$(CP) $(PKG_INSTALL_DIR)/files/luasrc/* $(1)/usr/lib/lua/luci
59
+endef
60
+
61
+define Package/luci-app-privoxy/postinst
62
+	#!/bin/sh
63
+	[ -z "$${IPKG_INSTROOT}" ] && {
64
+		/etc/uci-defaults/luci-privoxy && rm -f /etc/uci-defaults/luci-privoxy
65
+	}
66
+	exit 0
67
+endef
68
+
69
+$(eval $(call BuildPackage,luci-app-privoxy))

+ 174
- 0
net/privoxy-luci/files/luasrc/controller/privoxy.lua View File

@@ -0,0 +1,174 @@
1
+--[[
2
+LuCI - Lua Configuration Interface
3
+
4
+Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
5
+
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
9
+
10
+	http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+$Id$
13
+]]--
14
+
15
+module("luci.controller.privoxy", package.seeall)
16
+
17
+local NX   = require "nixio"
18
+local NXFS = require "nixio.fs"
19
+local HTTP = require "luci.http"
20
+local IPKG = require "luci.model.ipkg"
21
+local UCI  = require "luci.model.uci"
22
+local SYS  = require "luci.sys"
23
+local UTIL = require "luci.util"
24
+
25
+version_luci_app = "1.0.0"	-- luci-application / openwrt Makefile compatible version
26
+version_required = "3.0.22"	-- minimum required service version
27
+
28
+function index()
29
+	local _service	= "privoxy"
30
+	local _vermin	= "3.0.22"
31
+	local _verinst
32
+	local _util	= require "luci.util"
33
+	local _ipkg	= require "luci.model.ipkg"
34
+	local _info	= _ipkg.info(_service)
35
+	for _, v in pairs(_info) do
36
+		if v.Package == _service and v.Status.installed then
37
+			_verinst = v.Version
38
+			break
39
+		end
40
+	end
41
+	local _sver = _util.split(_verinst, "[%.%-]", nil, true)
42
+	local _rver = _util.split(_vermin , "[%.%-]", nil, true)
43
+
44
+	-- check config file and version 
45
+	if not nixio.fs.access("/etc/config/" .. _service )
46
+	    or (tonumber(_sver[1]) or 0) < (tonumber(_rver[1]) or 0)
47
+	    or (tonumber(_sver[2]) or 0) < (tonumber(_rver[2]) or 0)
48
+	    or (tonumber(_sver[3]) or 0) < (tonumber(_rver[3]) or 0)
49
+	    or (tonumber(_sver[4]) or 0) < (tonumber(_rver[4]) or 0) then
50
+		entry( {"admin", "services", "privoxy"}, cbi("privoxy/apperror", 
51
+			{hideapplybtn=true, hidesavebtn=true, hideresetbtn=true }), _("Privoxy WEB proxy"), 59)
52
+	else
53
+		entry( {"admin", "services", "privoxy"}, cbi("privoxy/detail"), _("Privoxy WEB proxy"), 59)
54
+		entry( {"admin", "services", "privoxy", "logview"}, call("logread") ).leaf = true
55
+		entry( {"admin", "services", "privoxy", "startstop"}, call("startstop") ).leaf = true
56
+		entry( {"admin", "services", "privoxy", "status"}, call("get_pid") ).leaf = true
57
+	end
58
+end
59
+
60
+-- called by XHR.get from detail_logview.htm
61
+function logread()
62
+	-- read application settings
63
+	local uci     = UCI.cursor()
64
+	local logdir  = uci:get("privoxy", "privoxy", "logdir") or "/var/log"
65
+	local logfile = uci:get("privoxy", "privoxy", "logfile") or "privoxy.log"
66
+	uci:unload("privoxy")
67
+
68
+	local lfile=logdir .. "/" .. logfile
69
+	local ldata=NXFS.readfile(lfile)
70
+	if not ldata or #ldata == 0 then
71
+		ldata="_nodata_"
72
+	end
73
+	HTTP.write(ldata)
74
+end
75
+
76
+-- called by XHR.get from detail_startstop.htm
77
+function startstop()
78
+	local pid = get_pid(true)
79
+	if pid > 0 then
80
+		SYS.call("/etc/init.d/privoxy stop")
81
+		NX.nanosleep(1)		-- sleep a second
82
+		if NX.kill(pid, 0) then	-- still running
83
+			NX.kill(pid, 9)	-- send SIGKILL
84
+		end
85
+		pid = 0
86
+	else
87
+		SYS.call("/etc/init.d/privoxy start")
88
+		NX.nanosleep(1)		-- sleep a second
89
+		pid = tonumber(NXFS.readfile("/var/run/privoxy.pid") or 0 )
90
+		if pid > 0 and not NX.kill(pid, 0) then
91
+			pid = 0		-- process did not start
92
+		end
93
+	end
94
+	HTTP.write(tostring(pid))	-- HTTP needs string not number
95
+end
96
+
97
+-- called by XHR.poll from detail_startstop.htm
98
+-- and from lua (with parameter "true")
99
+function get_pid(from_lua)
100
+	local pid = tonumber(NXFS.readfile("/var/run/privoxy.pid") or 0 )
101
+	if pid > 0 and not NX.kill(pid, 0) then
102
+		pid = 0
103
+	end
104
+	if from_lua then
105
+		return pid
106
+	else
107
+		HTTP.write(tostring(pid))	-- HTTP needs string not number
108
+	end
109
+end
110
+
111
+-- get the "name" of the current active theme
112
+function get_theme()
113
+	local _uci  = UCI.cursor()
114
+	local _base = _uci:get("luci", "main", "mediaurlbase")	-- only pathname
115
+	_uci:unload("luci")
116
+
117
+	for k, v in pairs(luci.config.themes) do
118
+		if k:sub(1, 1) ~= "." and v == _base then
119
+			return k
120
+		end
121
+	end
122
+	return nil
123
+end
124
+
125
+-- read version information for given package if installed
126
+function ipkg_version(package)
127
+	if not package then
128
+		return nil
129
+	end
130
+	local _info = IPKG.info(package)
131
+	local _data = {}
132
+	local _version = ""
133
+	local i = 0
134
+	for k, v in pairs(_info) do
135
+		if v.Package == package and v.Status.installed then
136
+			_version = v.Version
137
+			i = i + 1
138
+		end
139
+	end
140
+	if i > 1 then	-- more then one valid record
141
+		return _data
142
+	end
143
+	local _sver = UTIL.split(_version, "[%.%-]", nil, true)
144
+	_data = {
145
+		version = _version,
146
+		major   = tonumber(_sver[1]) or 0,
147
+		minor   = tonumber(_sver[2]) or 0,
148
+		patch   = tonumber(_sver[3]) or 0,
149
+		build   = tonumber(_sver[4]) or 0
150
+	}
151
+	return _data
152
+end
153
+
154
+-- replacement of build-in Flag.parse of cbi.lua
155
+-- modified to mark section as changed if value changes
156
+-- current parse did not do this, but it is done AbstaractValue.parse()
157
+function flag_parse(self, section)
158
+	local fexists = self.map:formvalue(
159
+		luci.cbi.FEXIST_PREFIX .. self.config .. "." .. section .. "." .. self.option)
160
+
161
+	if fexists then
162
+		local fvalue = self:formvalue(section) and self.enabled or self.disabled
163
+		local cvalue = self:cfgvalue(section)
164
+		if fvalue ~= self.default or (not self.optional and not self.rmempty) then
165
+			self:write(section, fvalue)
166
+		else
167
+			self:remove(section)
168
+		end
169
+		if (fvalue ~= cvalue) then self.section.changed = true end
170
+	else
171
+		self:remove(section)
172
+		self.section.changed = true
173
+	end
174
+end

+ 58
- 0
net/privoxy-luci/files/luasrc/model/cbi/privoxy/apperror.lua View File

@@ -0,0 +1,58 @@
1
+--[[
2
+LuCI - Lua Configuration Interface
3
+
4
+Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
5
+
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
9
+
10
+	http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+$Id$
13
+]]--
14
+
15
+local CTRL = require "luci.controller.privoxy"	-- privoxy multiused functions
16
+local DISP = require "luci.dispatcher"
17
+
18
+-- Build javascript string to be displayed as version information
19
+local VERSION = translate("Version Information")
20
+		.. [[\n\nluci-app-privoxy]]
21
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_luci_app
22
+		.. [[\n\t]] .. translate("Build") .. [[:\t]] .. CTRL.ipkg_version("luci-app-privoxy").version
23
+		.. [[\n\nprivoxy ]] .. translate("required") .. [[:]]
24
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_required .. [[ ]] .. translate("or higher")
25
+		.. [[\n\nprivoxy ]] .. translate("installed") .. [[:]]
26
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.ipkg_version("privoxy").version
27
+		.. [[\n\n]]
28
+local HELP = [[<a href="http://www.privoxy.org/user-manual/config.html#%s" target="_blank">%s</a>]]
29
+
30
+-- cbi-map -- ##################################################################
31
+local m	= Map("privoxy")
32
+m.title	= [[</a><a href="javascript:alert(']] 
33
+	.. VERSION 
34
+	.. [[')">]] 
35
+	.. translate("Privoxy WEB proxy")
36
+m.description = translate("Privoxy is a non-caching web proxy with advanced filtering "
37
+		.. "capabilities for enhancing privacy, modifying web page data and HTTP headers, "
38
+		.. "controlling access, and removing ads and other obnoxious Internet junk.")
39
+
40
+-- cbi-section -- ##############################################################
41
+local s = m:section(SimpleSection)
42
+s.title = [[<font color="red">]] .. [[<strong>]]
43
+	.. translate("Software update required")
44
+	.. [[</strong>]] .. [[</font>]]
45
+
46
+-- old privoxy sofware version --------------------------------------------------------------
47
+local v    = s:option(DummyValue, "_update_needed")
48
+v.titleref = DISP.build_url("admin", "system", "packages")
49
+v.rawhtml  = true
50
+--v.title    = [[<h3>]] .. [[<font color="red">]] .. [[<strong>]]
51
+--	   .. translate("Software update required")
52
+--	   .. [[</strong>]] .. [[</font>]] .. [[</h3>]] .. [[<br />]]
53
+v.value    = [[<h3>]] .. [[<strong>]]
54
+	   .. translate("The currently installed 'privoxy' package is not supported by LuCI application.")
55
+	   .. [[<br />]]
56
+	   .. translate("Please update to the current version!")
57
+	   .. [[</strong>]] .. [[</h3>]]
58
+return m

+ 940
- 0
net/privoxy-luci/files/luasrc/model/cbi/privoxy/detail.lua View File

@@ -0,0 +1,940 @@
1
+--[[
2
+LuCI - Lua Configuration Interface
3
+
4
+Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
5
+
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
9
+
10
+	http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+$Id$
13
+]]--
14
+
15
+local NXFS = require "nixio.fs"
16
+local LUFS = require "luci.fs"
17
+local SYS  = require "luci.sys"
18
+local UTIL = require "luci.util"
19
+local DTYP = require "luci.cbi.datatypes"
20
+local CTRL = require "luci.controller.privoxy"	-- privoxy multiused functions
21
+
22
+-- Bootstrap theme needs 2 or 3 additional linefeeds for tab description for better optic
23
+local LFLF = (CTRL.get_theme() == "Bootstrap") and [[<br /><br /><br />]] or [[]]
24
+-- Build javascript string to be displayed as version information
25
+local VERSION = translate("Version Information")
26
+		.. [[\n\nluci-app-privoxy]]
27
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_luci_app
28
+		.. [[\n\t]] .. translate("Build") .. [[:\t]] .. CTRL.ipkg_version("luci-app-privoxy").version
29
+		.. [[\n\nprivoxy ]] .. translate("required") .. [[:]]
30
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_required .. [[ ]] .. translate("or greater")
31
+		.. [[\n\nprivoxy ]] .. translate("installed") .. [[:]]
32
+		.. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.ipkg_version("privoxy").version
33
+		.. [[\n\n]]
34
+local HELP = [[<a href="http://www.privoxy.org/user-manual/config.html#%s" target="_blank">%s</a>]]
35
+
36
+-- cbi-map -- ##################################################################
37
+local m	= Map("privoxy")
38
+m.title	= [[</a><a href="javascript:alert(']] 
39
+	.. VERSION 
40
+	.. [[')">]] 
41
+	.. translate("Privoxy WEB proxy")
42
+m.description = translate("Privoxy is a non-caching web proxy with advanced filtering "
43
+		.. "capabilities for enhancing privacy, modifying web page data and HTTP headers, "
44
+		.. "controlling access, and removing ads and other obnoxious Internet junk.")
45
+		.. [[<br /><strong>]]
46
+		.. translate("For help use link at the relevant option")
47
+		.. [[</strong>]]
48
+function m.commit_handler(self)
49
+	if self.changed then	-- changes ?
50
+		os.execute("/etc/init.d/privoxy reload &")	-- reload configuration
51
+	end
52
+end
53
+
54
+-- cbi-section -- ##############################################################
55
+local ns = m:section( NamedSection, "privoxy", "privoxy")
56
+
57
+ns:tab("local",
58
+	translate("Local Set-up"),
59
+	translate("If you intend to operate Privoxy for more users than just yourself, "
60
+		.. "it might be a good idea to let them know how to reach you, what you block "
61
+		.. "and why you do that, your policies, etc.")
62
+		.. LFLF )
63
+local function err_tab_local(self, msg)
64
+	return string.format(translate("Local Set-up") .. " - %s: %s", self.title_base, msg )
65
+end
66
+
67
+ns:tab("filter",
68
+	translate("Files and Directories"),
69
+	translate("Privoxy can (and normally does) use a number of other files "
70
+		.. "for additional configuration, help and logging. This section of "
71
+		.. "the configuration file tells Privoxy where to find those other files.")
72
+		.. LFLF )
73
+local function err_tab_filter(self, msg)
74
+	return string.format(translate("Files and Directories") .. " - %s: %s", self.title_base, msg )
75
+end
76
+
77
+ns:tab("access", 
78
+	translate("Access Control"), 
79
+	translate("This tab controls the security-relevant aspects of Privoxy's configuration.") 
80
+		.. LFLF )
81
+local function err_tab_access(self, msg)
82
+	return string.format(translate("Access Control") .. " - %s: %s", self.title_base, msg )
83
+end
84
+
85
+ns:tab("forward",
86
+	translate("Forwarding"),
87
+	translate("Configure here the routing of HTTP requests through a chain of multiple proxies. "
88
+		.. "Note that parent proxies can severely decrease your privacy level. "
89
+		.. "Also specified here are SOCKS proxies.")
90
+		.. LFLF )
91
+
92
+ns:tab("misc",
93
+	translate("Miscellaneous"),
94
+	nil)
95
+local function err_tab_misc(self, msg)
96
+	return string.format(translate("Miscellaneous") .. " - %s: %s", self.title_base, msg )
97
+end
98
+
99
+ns:tab("debug", 
100
+	translate("Logging"),
101
+	nil )
102
+
103
+ns:tab("logview",
104
+	translate("Log File Viewer"),
105
+	nil )
106
+
107
+-- tab: local -- ###############################################################
108
+
109
+-- start/stop button -----------------------------------------------------------
110
+local btn	= ns:taboption("local", Button, "_startstop")
111
+btn.title	= translate("Start / Stop")
112
+btn.description	= translate("Start/Stop Privoxy WEB Proxy")
113
+btn.template	= "privoxy/detail_startstop"
114
+function btn.cfgvalue(self, section)
115
+	local pid = CTRL.get_pid(true)
116
+	if pid > 0 then
117
+		btn.inputtitle	= "PID: " .. pid
118
+		btn.inputstyle	= "reset"
119
+		btn.disabled	= false
120
+	else
121
+		btn.inputtitle	= translate("Start")
122
+		btn.inputstyle	= "apply"
123
+		btn.disabled	= false
124
+	end
125
+	return true
126
+end
127
+
128
+-- enabled ---------------------------------------------------------------------
129
+local ena	= ns:taboption("local", Flag, "_enabled")
130
+ena.title       = translate("Enabled")
131
+ena.description = translate("Enable/Disable autostart of Privoxy on system startup and interface events")
132
+ena.orientation = "horizontal" -- put description under the checkbox
133
+ena.rmempty	= false
134
+function ena.cfgvalue(self, section)
135
+	return (SYS.init.enabled("privoxy")) and "1" or "0"
136
+end
137
+function ena.validate(self, value)
138
+	error("Validate " .. value)
139
+end
140
+function ena.write(self, section, value)
141
+	--error("Write " .. value)
142
+	if value == "1" then
143
+		return SYS.init.enable("privoxy")
144
+	else
145
+		return SYS.init.disable("privoxy")
146
+	end
147
+end
148
+
149
+-- hostname --------------------------------------------------------------------
150
+local hn	= ns:taboption("local", Value, "hostname")
151
+hn.title	= string.format(HELP, "HOSTNAME", "Hostname" )
152
+hn.description	= translate("The hostname shown on the CGI pages.")
153
+hn.placeholder	= SYS.hostname()
154
+hn.optional	= true
155
+hn.rmempty	= true
156
+
157
+-- user-manual -----------------------------------------------------------------
158
+local um	= ns:taboption("local", Value, "user_manual")
159
+um.title	= string.format(HELP, "USER-MANUAL", "User Manual" )
160
+um.description	= translate("Location of the Privoxy User Manual.")
161
+um.placeholder	= "http://www.privoxy.org/user-manual/"
162
+um.optional	= true
163
+um.rmempty	= true
164
+
165
+-- admin-address ---------------------------------------------------------------
166
+local aa	= ns:taboption("local", Value, "admin_address")
167
+aa.title_base	= "Admin Email"
168
+aa.title	= string.format(HELP, "ADMIN-ADDRESS", aa.title_base )
169
+aa.description	= translate("An email address to reach the Privoxy administrator.")
170
+aa.placeholder	= "privoxy.admin@example.com"
171
+aa.optional	= true
172
+aa.rmempty	= true
173
+function aa.validate(self, value)
174
+	if not value or #value == 0 then
175
+		return ""
176
+	end
177
+	if not (value:match("[A-Za-z0-9%.%%%+%-]+@[A-Za-z0-9%.%%%+%-]+%.%w%w%w?%w?")) then
178
+		return nil, err_tab_local(self, translate("Invalid email address") )
179
+	end
180
+	return value
181
+end
182
+
183
+-- proxy-info-url --------------------------------------------------------------
184
+local piu	= ns:taboption("local", Value, "proxy_info_url")
185
+piu.title	= string.format(HELP, "PROXY-INFO-URL", "Proxy Info URL" )
186
+piu.description	= translate("A URL to documentation about the local Privoxy setup, configuration or policies.")
187
+piu.optional	= true
188
+piu.rmempty	= true
189
+
190
+-- trust-info-url --------------------------------------------------------------
191
+local tiu	= ns:taboption("local", DynamicList, "trust_info_url")
192
+tiu.title	= string.format(HELP, "TRUST-INFO-URL", "Trust Info URLs" )
193
+tiu.description	= translate("A URL to be displayed in the error page that users will see if access to an untrusted page is denied.")
194
+		.. [[<br /><strong>]]
195
+		.. translate("The value of this option only matters if the experimental trust mechanism has been activated.")
196
+		.. [[</strong>]]
197
+tiu.optional	= true
198
+tiu.rmepty	= true
199
+
200
+-- tab: filter -- ##############################################################
201
+
202
+-- logdir ----------------------------------------------------------------------
203
+local ld	= ns:taboption("filter", Value, "logdir")
204
+ld.title_base	= "Log Directory"
205
+ld.title	= string.format(HELP, "LOGDIR", ld.title_base )
206
+ld.description	= translate("The directory where all logging takes place (i.e. where the logfile is located).")
207
+		.. [[<br />]]
208
+		.. translate("No trailing '/', please.")
209
+ld.default	= "/var/log"
210
+ld.rmempty	= false
211
+function ld.validate(self, value)
212
+	if not value or #value == 0 then
213
+		return nil, err_tab_filter(self, translate("Mandatory Input: No Directory given!") )
214
+	elseif not LUFS.isdirectory(value) then
215
+		return nil, err_tab_filter(self, translate("Directory does not exist!") )
216
+	else
217
+		return value
218
+	end
219
+end
220
+
221
+-- logfile ---------------------------------------------------------------------
222
+local lf	= ns:taboption("filter", Value, "logfile")
223
+lf.title_base	= "Log File"
224
+lf.title	= string.format(HELP, "LOGFILE", lf.title_base )
225
+lf.description	= translate("The log file to use. File name, relative to log directory.")
226
+lf.default	= "privoxy.log"
227
+lf.rmempty	= false
228
+function lf.validate(self, value)
229
+	if not value or #value == 0 then
230
+		return nil, err_tab_filter(self, translate("Mandatory Input: No File given!") )
231
+	else
232
+		return value
233
+	end
234
+end
235
+
236
+-- confdir ---------------------------------------------------------------------
237
+local cd	= ns:taboption("filter", Value, "confdir")
238
+cd.title	= string.format(HELP, "CONFDIR", "Configuration Directory" )
239
+cd.description	= translate("The directory where the other configuration files are located.")
240
+		.. [[<br />]]
241
+		.. translate("No trailing '/', please.")
242
+cd.default	= "/etc/privoxy"
243
+cd.rmempty	= false
244
+function cd.validate(self, value)
245
+	if not value or #value == 0 then
246
+		return nil, err_tab_filter(self, translate("Mandatory Input: No Directory given!") )
247
+	elseif not LUFS.isdirectory(value) then
248
+		return nil, err_tab_filter(self, translate("Directory does not exist!") )
249
+	else
250
+		return value
251
+	end
252
+end
253
+
254
+-- templdir --------------------------------------------------------------------
255
+local td	= ns:taboption("filter", Value, "templdir")
256
+td.title_base	= "Template Directory"
257
+td.title	= string.format(HELP, "TEMPLDIR", td.title_base )
258
+td.description	= translate("An alternative directory where the templates are loaded from.")
259
+		.. [[<br />]]
260
+		.. translate("No trailing '/', please.")
261
+td.placeholder	= "/etc/privoxy/templates"
262
+td.rmempty	= true
263
+function td.validate(self, value)
264
+	if not LUFS.isdirectory(value) then
265
+		return nil, err_tab_filter(self, translate("Directory does not exist!") )
266
+	else
267
+		return value
268
+	end
269
+end
270
+
271
+-- actionsfile -----------------------------------------------------------------
272
+local af	= ns:taboption("filter", DynamicList, "actionsfile")
273
+af.title_base	= "Action Files"
274
+af.title	= string.format(HELP, "ACTIONSFILE", af.title_base)
275
+af.description	= translate("The actions file(s) to use. Multiple actionsfile lines are permitted, and are in fact recommended!")
276
+		.. [[<br /><strong>match-all.action := </strong>]]
277
+		.. translate("Actions that are applied to all sites and maybe overruled later on.")
278
+		.. [[<br /><strong>default.action := </strong>]]
279
+		.. translate("Main actions file")
280
+		.. [[<br /><strong>user.action := </strong>]]
281
+		.. translate("User customizations")
282
+af.rmempty	= false
283
+function af.validate(self, value)
284
+	if not value or #value == 0 then
285
+		return nil, err_tab_access(self, translate("Mandatory Input: No files given!") )
286
+	end
287
+	local confdir = cd:formvalue(ns.section)
288
+	local err     = false
289
+	local file    = ""
290
+	if type(value) == "table" then
291
+		local x
292
+		for _, x in ipairs(value) do
293
+			if x and #x > 0 then
294
+				if not LUFS.isfile(confdir .."/".. x) then
295
+					err  = true
296
+					file = x
297
+					break	-- break/leave for on error
298
+				end
299
+			end
300
+		end
301
+	else
302
+		if not LUFS.isfile(confdir .."/".. value) then
303
+			err  = true
304
+			file = value
305
+		end
306
+	end
307
+	if err then
308
+		return nil, string.format(err_tab_filter(self, translate("File '%s' not found inside Configuration Directory") ), file)
309
+	end
310
+	return value	
311
+end
312
+
313
+-- filterfile ------------------------------------------------------------------
314
+local ff	= ns:taboption("filter", DynamicList, "filterfile")
315
+ff.title_base	= "Filter files"
316
+ff.title	= string.format(HELP, "FILTERFILE", ff.title_base )
317
+ff.description	= translate("The filter files contain content modification rules that use regular expressions.")
318
+ff.rmempty	= false
319
+function ff.validate(self, value)
320
+	if not value or #value == 0 then
321
+		return nil, err_tab_access(self, translate("Mandatory Input: No files given!") )
322
+	end
323
+	local confdir = cd:formvalue(ns.section)
324
+	local err     = false
325
+	local file    = ""
326
+	if type(value) == "table" then
327
+		local x
328
+		for _, x in ipairs(value) do
329
+			if x and #x > 0 then
330
+				if not LUFS.isfile(confdir .."/".. x) then
331
+					err  = true
332
+					file = x
333
+					break	-- break/leave for on error
334
+				end
335
+			end
336
+		end
337
+	else
338
+		if not LUFS.isfile(confdir .."/".. value) then
339
+			err  = true
340
+			file = value
341
+		end
342
+	end
343
+	if err then
344
+		return nil, string.format(err_tab_filter(self, translate("File '%s' not found inside Configuration Directory") ), file )
345
+	end
346
+	return value	
347
+end
348
+
349
+-- trustfile -------------------------------------------------------------------
350
+local tf	= ns:taboption("filter", Value, "trustfile")
351
+tf.title_base	= "Trust file"
352
+tf.title	= string.format(HELP, "TRUSTFILE", tf.title_base )
353
+tf.description	= translate("The trust mechanism is an experimental feature for building white-lists "
354
+		.."and should be used with care.")
355
+		.. [[<br /><strong>]]
356
+		.. translate("It is NOT recommended for the casual user.")
357
+		.. [[</strong>]]
358
+tf.placeholder	= "sites.trust"
359
+tf.rmempty	= true
360
+function tf.validate(self, value)
361
+	local confdir = cd:formvalue(ns.section)
362
+	local err     = false
363
+	local file    = ""
364
+	if type(value) == "table" then
365
+		local x
366
+		for _, x in ipairs(value) do
367
+			if x and #x > 0 then
368
+				if not LUFS.isfile(confdir .."/".. x) then
369
+					err  = true
370
+					file = x
371
+					break	-- break/leave for on error
372
+				end
373
+			end
374
+		end
375
+	else
376
+		if not LUFS.isfile(confdir .."/".. value) then
377
+			err  = true
378
+			file = value
379
+		end
380
+	end
381
+	if err then
382
+		return nil, string.format(err_tab_filter(self, translate("File '%s' not found inside Configuration Directory") ), file )
383
+	end
384
+	return value	
385
+end
386
+
387
+-- tab: access -- ##############################################################
388
+
389
+-- listen-address --------------------------------------------------------------
390
+local la	= ns:taboption("access", DynamicList, "listen_address")
391
+la.title_base	= "Listen addresses"
392
+la.title	= string.format(HELP, "LISTEN-ADDRESS", la.title_base )
393
+la.description	= translate("The address and TCP port on which Privoxy will listen for client requests.")
394
+		.. [[<br />]]
395
+		.. translate("Syntax: ")
396
+		.. "IPv4:Port / [IPv6]:Port / Host:Port"
397
+la.default	= "127.0.0.1:8118"
398
+la.rmempty	= false
399
+function la.validate(self, value)
400
+	if not value or #value == 0 then
401
+		return nil, err_tab_access(self, translate("Mandatory Input: No Data given!") )
402
+	end
403
+
404
+	local function check_value(v)
405
+		local _ret = UTIL.split(v, "]:")
406
+		local _ip
407
+		if _ret[2] then	-- ip6 with port
408
+			_ip   = string.gsub(_ret[1], "%[", "")	-- remove "[" at beginning
409
+			if not DTYP.ip6addr(_ip) then
410
+				return translate("Mandatory Input: No valid IPv6 address given!")
411
+			elseif not DTYP.port(_ret[2]) then
412
+				return translate("Mandatory Input: No valid Port given!")
413
+			else
414
+				return nil
415
+			end
416
+		end
417
+		_ret = UTIL.split(v, ":")
418
+		if not _ret[2] then
419
+			return translate("Mandatory Input: No Port given!")
420
+		end
421
+		if #_ret[1] > 0 and not DTYP.host(_ret[1]) then	-- :8118 is valid address
422
+			return translate("Mandatory Input: No valid IPv4 address or host given!")
423
+		elseif not DTYP.port(_ret[2]) then
424
+			return translate("Mandatory Input: No valid Port given!")
425
+		else
426
+			return nil
427
+		end
428
+	end
429
+
430
+	local err   = ""
431
+	local entry = ""
432
+	if type(value) == "table" then
433
+		local x
434
+		for _, x in ipairs(value) do
435
+			if x and #x > 0 then
436
+				err = check_value(x)
437
+				if err then
438
+					entry = x
439
+					break
440
+				end
441
+			end
442
+		end
443
+	else
444
+		err = check_value(value)
445
+		entry = value
446
+	end
447
+	if err then
448
+		return nil, string.format(err_tab_access(self, err .. " - %s"), entry )
449
+	end
450
+	return value
451
+end
452
+
453
+-- permit-access ---------------------------------------------------------------
454
+local pa	= ns:taboption("access", DynamicList, "permit_access")
455
+pa.title	= string.format(HELP, "ACLS", "Permit access" )
456
+pa.description	= translate("Who can access what.")
457
+		.. [[<br /><strong>]]
458
+		.. translate("Please read Privoxy manual for details!")
459
+		.. [[</strong>]]
460
+pa.rmempty	= true
461
+
462
+-- deny-access -----------------------------------------------------------------
463
+local da	= ns:taboption("access", DynamicList, "deny_access")
464
+da.title	= string.format(HELP, "ACLS", "Deny Access" )
465
+da.description	= translate("Who can access what.")
466
+		.. [[<br /><strong>]]
467
+		.. translate("Please read Privoxy manual for details!")
468
+		.. [[</strong>]]
469
+da.rmempty	= true
470
+
471
+-- buffer-limit ----------------------------------------------------------------
472
+local bl	= ns:taboption("access", Value, "buffer_limit")
473
+bl.title_base	= "Buffer Limit"
474
+bl.title	= string.format(HELP, "BUFFER-LIMIT", bl.title_base )
475
+bl.description	= translate("Maximum size (in KB) of the buffer for content filtering.")
476
+		.. [[<br />]]
477
+		.. translate("Value range 1 to 4096, no entry defaults to 4096")
478
+bl.default	= 4096
479
+bl.rmempty	= true
480
+function bl.validate(self, value)
481
+	local v = tonumber(value)
482
+	if not v then
483
+		return nil, err_tab_access(self, translate("Value is not a number") )
484
+	elseif v < 1 or v > 4096 then
485
+		return nil, err_tab_access(self, translate("Value not between 1 and 4096") )
486
+	elseif v == self.default then
487
+		return ""	-- dont need to save default
488
+	end
489
+	return value
490
+end
491
+
492
+-- toggle ----------------------------------------------------------------------
493
+local tgl	= ns:taboption("access", Flag, "toggle")
494
+tgl.title	= string.format(HELP, "TOGGLE", "Toggle Status" )
495
+tgl.description	= translate("Enable/Disable filtering when Privoxy starts.")
496
+		.. [[<br />]]
497
+		.. translate("Disabled == Transparent Proxy Mode")
498
+tgl.orientation	= "horizontal"
499
+tgl.default	= "1"
500
+tgl.rmempty	= false
501
+function tgl.parse(self, section)
502
+	CTRL.flag_parse(self, section)
503
+end
504
+
505
+-- enable-remote-toggle --------------------------------------------------------
506
+local ert	= ns:taboption("access", Flag, "enable_remote_toggle")
507
+ert.title	= string.format(HELP, "ENABLE-REMOTE-TOGGLE", "Enable remote toggle" )
508
+ert.description	= translate("Whether or not the web-based toggle feature may be used.")
509
+ert.orientation	= "horizontal"
510
+ert.rmempty	= true
511
+function ert.parse(self, section)
512
+	CTRL.flag_parse(self, section)
513
+end
514
+
515
+-- enable-remote-http-toggle ---------------------------------------------------
516
+local eht	= ns:taboption("access", Flag, "enable_remote_http_toggle")
517
+eht.title	= string.format(HELP, "ENABLE-REMOTE-HTTP-TOGGLE", "Enable remote toggle via HTTP" )
518
+eht.description	= translate("Whether or not Privoxy recognizes special HTTP headers to change its behaviour.")
519
+		.. [[<br /><strong>]]
520
+		.. translate("This option will be removed in future releases as it has been obsoleted by the more general header taggers.")
521
+		.. [[</strong>]]
522
+eht.orientation	= "horizontal"
523
+eht.rmempty	= true
524
+function eht.parse(self, section)
525
+	CTRL.flag_parse(self, section)
526
+end
527
+
528
+-- enable-edit-actions ---------------------------------------------------------
529
+local eea	= ns:taboption("access", Flag, "enable_edit_actions")
530
+eea.title	= string.format(HELP, "ENABLE-EDIT-ACTIONS", "Enable action file editor" )
531
+eea.description	= translate("Whether or not the web-based actions file editor may be used.")
532
+eea.orientation	= "horizontal"
533
+eea.rmempty	= true
534
+function eea.parse(self, section)
535
+	CTRL.flag_parse(self, section)
536
+end
537
+
538
+-- enforce-blocks --------------------------------------------------------------
539
+local eb	= ns:taboption("access", Flag, "enforce_blocks")
540
+eb.title	= string.format(HELP, "ENFORCE-BLOCKS", "Enforce page blocking" )
541
+eb.description	= translate("If enabled, Privoxy hides the 'go there anyway' link. "
542
+		.. "The user obviously should not be able to bypass any blocks.")
543
+eb.orientation	= "horizontal"
544
+eb.rmempty	= true
545
+function eb.parse(self, section)
546
+	CTRL.flag_parse(self, section)
547
+end
548
+
549
+-- tab: forward -- #############################################################
550
+
551
+-- enable-proxy-authentication-forwarding --------------------------------------
552
+local paf	= ns:taboption("forward", Flag, "enable_proxy_authentication_forwarding")
553
+paf.title	= string.format(HELP, "ENABLE-PROXY-AUTHENTICATION-FORWARDING", 
554
+		translate("Enable proxy authentication forwarding") )
555
+paf.description	= translate("Whether or not proxy authentication through Privoxy should work.")
556
+		.. [[<br /><strong>]]
557
+		.. translate("Enabling this option is NOT recommended if there is no parent proxy that requires authentication!")
558
+		.. [[</strong>]]
559
+--paf.orientation	= "horizontal"
560
+paf.rmempty	= true
561
+function paf.parse(self, section)
562
+	CTRL.flag_parse(self, section)
563
+end
564
+
565
+-- forward ---------------------------------------------------------------------
566
+local fwd	= ns:taboption("forward", DynamicList, "forward")
567
+fwd.title	= string.format(HELP, "FORWARD", "Forward HTTP" )
568
+fwd.description	= translate("To which parent HTTP proxy specific requests should be routed.")
569
+		.. [[<br />]]
570
+		.. translate("Syntax: target_pattern http_parent[:port]")
571
+fwd.rmempty	= true
572
+
573
+-- forward-socks4 --------------------------------------------------------------
574
+local fs4	= ns:taboption("forward", DynamicList, "forward_socks4")
575
+fs4.title	= string.format(HELP, "SOCKS", "Forward SOCKS 4" )
576
+fs4.description	= translate("Through which SOCKS proxy (and optionally to which parent HTTP proxy) specific requests should be routed.")
577
+		.. [[<br />]]
578
+		.. translate("Syntax: target_pattern socks_proxy[:port] http_parent[:port]")
579
+fs4.rmempty	= true
580
+
581
+-- forward-socks4a -------------------------------------------------------------
582
+local f4a	= ns:taboption("forward", DynamicList, "forward_socks4a")
583
+f4a.title	= string.format(HELP, "SOCKS", "Forward SOCKS 4A" )
584
+f4a.description = fs4.description
585
+f4a.rmempty	= true
586
+
587
+-- forward-socks5 --------------------------------------------------------------
588
+local fs5	= ns:taboption("forward", DynamicList, "forward_socks5")
589
+fs5.title	= string.format(HELP, "SOCKS", "Forward SOCKS 5" )
590
+fs5.description = fs4.description
591
+fs5.rmempty	= true
592
+
593
+-- forward-socks5t -------------------------------------------------------------
594
+local f5t	= ns:taboption("forward", DynamicList, "forward_socks5t")
595
+f5t.title	= string.format(HELP, "SOCKS", "Forward SOCKS 5t" )
596
+f5t.description = fs4.description
597
+f5t.rmempty	= true
598
+
599
+-- tab: misc -- ################################################################
600
+
601
+-- accept-intercepted-requests -------------------------------------------------
602
+local air	= ns:taboption("misc", Flag, "accept_intercepted_requests")
603
+air.title	= string.format(HELP, "ACCEPT-INTERCEPTED-REQUESTS", "Accept intercepted requests" )
604
+air.description	= translate("Whether intercepted requests should be treated as valid.")
605
+air.orientation	= "horizontal"
606
+air.rmempty	= true
607
+function air.parse(self, section)
608
+	CTRL.flag_parse(self, section)
609
+end
610
+
611
+-- allow-cgi-request-crunching -------------------------------------------------
612
+local crc	= ns:taboption("misc", Flag, "allow_cgi_request_crunching")
613
+crc.title	= string.format(HELP, "ALLOW-CGI-REQUEST-CRUNCHING", "Allow CGI request crunching" )
614
+crc.description	= translate("Whether requests to Privoxy's CGI pages can be blocked or redirected.")
615
+crc.orientation	= "horizontal"
616
+crc.rmempty	= true
617
+function crc.parse(self, section)
618
+	CTRL.flag_parse(self, section)
619
+end
620
+
621
+-- split-large-forms -----------------------------------------------------------
622
+local slf	= ns:taboption("misc", Flag, "split_large_forms")
623
+slf.title	= string.format(HELP, "SPLIT-LARGE-FORMS", "Split large forms" )
624
+slf.description	= translate("Whether the CGI interface should stay compatible with broken HTTP clients.")
625
+slf.orientation	= "horizontal"
626
+slf.rmempty	= true
627
+function slf.parse(self, section)
628
+	CTRL.flag_parse(self, section)
629
+end
630
+
631
+-- keep-alive-timeout ----------------------------------------------------------
632
+local kat	= ns:taboption("misc", Value, "keep_alive_timeout")
633
+kat.title_base	= "Keep-alive timeout"
634
+kat.title	= string.format(HELP, "KEEP-ALIVE-TIMEOUT", kat.title_base)
635
+kat.description	= translate("Number of seconds after which an open connection will no longer be reused.")
636
+kat.rmempty	= true
637
+function kat.validate(self, value)
638
+	local v = tonumber(value)
639
+	if not v then
640
+		return nil, err_tab_misc(self, translate("Value is not a number") )
641
+	elseif v < 1 then
642
+		return nil, err_tab_misc(self, translate("Value not greater 0 or empty") )
643
+	end
644
+	return value
645
+end
646
+
647
+-- tolerate-pipelining ---------------------------------------------------------
648
+local tp	= ns:taboption("misc", Flag, "tolerate_pipelining")
649
+tp.title	= string.format(HELP, "TOLERATE-PIPELINING", "Tolerate pipelining" )
650
+tp.description	= translate("Whether or not pipelined requests should be served.")
651
+tp.orientation	= "horizontal"
652
+tp.rmempty	= true
653
+function tp.parse(self, section)
654
+	CTRL.flag_parse(self, section)
655
+end
656
+
657
+-- default-server-timeout ------------------------------------------------------
658
+local dst	= ns:taboption("misc", Value, "default_server_timeout")
659
+dst.title_base	= "Default server timeout"
660
+dst.title	= string.format(HELP, "DEFAULT-SERVER-TIMEOUT", dst.title_base)
661
+dst.description	= translate("Assumed server-side keep-alive timeout (in seconds) if not specified by the server.")
662
+dst.rmempty	= true
663
+function dst.validate(self, value)
664
+	local v = tonumber(value)
665
+	if not v then
666
+		return nil, err_tab_misc(self, translate("Value is not a number") )
667
+	elseif v < 1 then
668
+		return nil, err_tab_misc(self, translate("Value not greater 0 or empty") )
669
+	end
670
+	return value
671
+end
672
+
673
+-- connection-sharing ----------------------------------------------------------
674
+local cs	= ns:taboption("misc", Flag, "connection_sharing")
675
+cs.title	= string.format(HELP, "CONNECTION-SHARING", "Connection sharing" )
676
+cs.description	= translate("Whether or not outgoing connections that have been kept alive should be shared between different incoming connections.")
677
+cs.orientation	= "horizontal"
678
+cs.rmempty	= true
679
+function cs.parse(self, section)
680
+	CTRL.flag_parse(self, section)
681
+end
682
+
683
+-- socket-timeout --------------------------------------------------------------
684
+local st	= ns:taboption("misc", Value, "socket_timeout")
685
+st.title_base	= "Socket timeout"
686
+st.title	= string.format(HELP, "SOCKET-TIMEOUT", st.title_base )
687
+st.description	= translate("Number of seconds after which a socket times out if no data is received.")
688
+st.default	= 300
689
+st.rmempty	= true
690
+function st.validate(self, value)
691
+	local v = tonumber(value)
692
+	if not v then
693
+		return nil, err_tab_misc(self, translate("Value is not a number") )
694
+	elseif v < 1 then
695
+		return nil, err_tab_misc(self, translate("Value not greater 0 or empty") )
696
+	elseif v == self.default then
697
+		return ""	-- dont need to save default
698
+	end
699
+	return value
700
+end
701
+
702
+-- max-client-connections ------------------------------------------------------
703
+local mcc	= ns:taboption("misc", Value, "max_client_connections")
704
+mcc.title_base	= "Max. client connections"
705
+mcc.title	= string.format(HELP, "MAX-CLIENT-CONNECTIONS", mcc.title_base )
706
+mcc.description	= translate("Maximum number of client connections that will be served.")
707
+mcc.default	= 128
708
+mcc.rmempty	= true
709
+function mcc.validate(self, value)
710
+	local v = tonumber(value)
711
+	if not v then
712
+		return nil, err_tab_misc(self, translate("Value is not a number") )
713
+	elseif v < 1 then
714
+		return nil, err_tab_misc(self, translate("Value not greater 0 or empty") )
715
+	elseif v == self.default then
716
+		return ""	-- dont need to save default
717
+	end
718
+	return value
719
+end
720
+
721
+-- handle-as-empty-doc-returns-ok ----------------------------------------------
722
+local her	= ns:taboption("misc", Flag, "handle_as_empty_doc_returns_ok")
723
+her.title	= string.format(HELP, "HANDLE-AS-EMPTY-DOC-RETURNS-OK", "Handle as empty doc returns ok" )
724
+her.description	= translate("The status code Privoxy returns for pages blocked with +handle-as-empty-document.")
725
+her.orientation	= "horizontal"
726
+her.rmempty	= true
727
+function her.parse(self, section)
728
+	CTRL.flag_parse(self, section)
729
+end
730
+
731
+-- enable-compression ----------------------------------------------------------
732
+local ec	= ns:taboption("misc", Flag, "enable_compression")
733
+ec.title	= string.format(HELP, "ENABLE-COMPRESSION", "Enable compression" )
734
+ec.description	= translate("Whether or not buffered content is compressed before delivery.")
735
+ec.orientation	= "horizontal"
736
+ec.rmempty	= true
737
+function ec.parse(self, section)
738
+	CTRL.flag_parse(self, section)
739
+end
740
+
741
+-- compression-level -----------------------------------------------------------
742
+local cl	= ns:taboption("misc", Value, "compression_level")
743
+cl.title_base	= "Compression level"
744
+cl.title	= string.format(HELP, "COMPRESSION-LEVEL", cl.title_base )
745
+cl.description	= translate("The compression level that is passed to the zlib library when compressing buffered content.")
746
+cl.default	= 1
747
+cl.rmempty	= true
748
+function cl.validate(self, value)
749
+	local v = tonumber(value)
750
+	if not v then
751
+		return nil, err_tab_misc(self, translate("Value is not a number") )
752
+	elseif v < 0 or v > 9 then
753
+		return nil, err_tab_misc(self, translate("Value not between 0 and 9") )
754
+	elseif v == self.default then
755
+		return ""	-- don't need to save default
756
+	end
757
+	return value
758
+end
759
+
760
+-- client-header-order ---------------------------------------------------------
761
+local cho	= ns:taboption("misc", Value, "client_header_order")
762
+cho.title	= string.format(HELP, "CLIENT-HEADER-ORDER", "Client header order" )
763
+cho.description	= translate("The order in which client headers are sorted before forwarding them.")
764
+		.. [[<br />]]
765
+		.. translate("Syntax: Client header names delimited by spaces.")
766
+cho.rmempty	= true
767
+
768
+-- "debug"-tab definition -- ###################################################
769
+
770
+-- single-threaded -------------------------------------------------------------
771
+local st	= ns:taboption("debug", Flag, "single_threaded")
772
+st.title	= string.format(HELP, "SINGLE-THREADED", "Single Threaded" )
773
+st.description	= translate("Whether to run only one server thread.")
774
+		.. [[<br /><strong>]]
775
+		.. translate("This option is only there for debugging purposes. It will drastically reduce performance.")
776
+		.. [[</strong>]]
777
+st.rmempty	= true
778
+function st.parse(self, section)
779
+	CTRL.flag_parse(self, section)
780
+end
781
+
782
+-- debug -----------------------------------------------------------------------
783
+local d1	= ns:taboption("debug", Flag, "debug_1")
784
+d1.title	= string.format(HELP, "DEBUG", "Debug 1" )
785
+d1.description	= translate("Log the destination for each request Privoxy let through. See also 'Debug 1024'.")
786
+d1.rmempty	= true
787
+function d1.parse(self, section)
788
+	CTRL.flag_parse(self, section)
789
+end
790
+
791
+-- debug -----------------------------------------------------------------------
792
+local d2	= ns:taboption("debug", Flag, "debug_2")
793
+d2.title	= string.format(HELP, "DEBUG", "Debug 2" )
794
+d2.description	= translate("Show each connection status")
795
+d2.rmempty	= true
796
+function d2.parse(self, section)
797
+	CTRL.flag_parse(self, section)
798
+end
799
+
800
+-- debug -----------------------------------------------------------------------
801
+local d3	= ns:taboption("debug", Flag, "debug_4")
802
+d3.title	= string.format(HELP, "DEBUG", "Debug 4" )
803
+d3.description	= translate("Show I/O status")
804
+d3.rmempty	= true
805
+function d3.parse(self, section)
806
+	CTRL.flag_parse(self, section)
807
+end
808
+
809
+-- debug -----------------------------------------------------------------------
810
+local d4	= ns:taboption("debug", Flag, "debug_8")
811
+d4.title	= string.format(HELP, "DEBUG", "Debug 8" )
812
+d4.description	= translate("Show header parsing")
813
+d4.rmempty	= true
814
+function d4.parse(self, section)
815
+	CTRL.flag_parse(self, section)
816
+end
817
+
818
+-- debug -----------------------------------------------------------------------
819
+local d5	= ns:taboption("debug", Flag, "debug_16")
820
+d5.title	= string.format(HELP, "DEBUG", "Debug 16" )
821
+d5.description	= translate("Log all data written to the network")
822
+d5.rmempty	= true
823
+function d5.parse(self, section)
824
+	CTRL.flag_parse(self, section)
825
+end
826
+
827
+-- debug -----------------------------------------------------------------------
828
+local d6	= ns:taboption("debug", Flag, "debug_32")
829
+d6.title	= string.format(HELP, "DEBUG", "Debug 32" )
830
+d6.description	= translate("Debug force feature")
831
+d6.rmempty	= true
832
+function d6.parse(self, section)
833
+	CTRL.flag_parse(self, section)
834
+end
835
+
836
+-- debug -----------------------------------------------------------------------
837
+local d7	= ns:taboption("debug", Flag, "debug_64")
838
+d7.title	= string.format(HELP, "DEBUG", "Debug 64" )
839
+d7.description	= translate("Debug regular expression filters")
840
+d7.rmempty	= true
841
+function d7.parse(self, section)
842
+	CTRL.flag_parse(self, section)
843
+end
844
+
845
+-- debug -----------------------------------------------------------------------
846
+local d8	= ns:taboption("debug", Flag, "debug_128")
847
+d8.title	= string.format(HELP, "DEBUG", "Debug 128" )
848
+d8.description	= translate("Debug redirects")
849
+d8.rmempty	= true
850
+function d8.parse(self, section)
851
+	CTRL.flag_parse(self, section)
852
+end
853
+
854
+-- debug -----------------------------------------------------------------------
855
+local d9	= ns:taboption("debug", Flag, "debug_256")
856
+d9.title	= string.format(HELP, "DEBUG", "Debug 256" )
857
+d9.description	= translate("Debug GIF de-animation")
858
+d9.rmempty	= true
859
+function d9.parse(self, section)
860
+	CTRL.flag_parse(self, section)
861
+end
862
+
863
+-- debug -----------------------------------------------------------------------
864
+local d10	= ns:taboption("debug", Flag, "debug_512")
865
+d10.title	= string.format(HELP, "DEBUG", "Debug 512" )
866
+d10.description	= translate("Common Log Format")
867
+d10.rmempty	= true
868
+function d10.parse(self, section)
869
+	CTRL.flag_parse(self, section)
870
+end
871
+
872
+-- debug -----------------------------------------------------------------------
873
+local d11	= ns:taboption("debug", Flag, "debug_1024")
874
+d11.title	= string.format(HELP, "DEBUG", "Debug 1024" )
875
+d11.description	= translate("Log the destination for requests Privoxy didn't let through, and the reason why.")
876
+d11.rmempty	= true
877
+function d11.parse(self, section)
878
+	CTRL.flag_parse(self, section)
879
+end
880
+
881
+-- debug -----------------------------------------------------------------------
882
+local d12	= ns:taboption("debug", Flag, "debug_2048")
883
+d12.title	= string.format(HELP, "DEBUG", "Debug 2048" )
884
+d12.description	= translate("CGI user interface")
885
+d12.rmempty	= true
886
+function d12.parse(self, section)
887
+	CTRL.flag_parse(self, section)
888
+end
889
+
890
+-- debug -----------------------------------------------------------------------
891
+local d13	= ns:taboption("debug", Flag, "debug_4096")
892
+d13.title	= string.format(HELP, "DEBUG", "Debug 4096" )
893
+d13.description	= translate("Startup banner and warnings.")
894
+d13.rmempty	= true
895
+function d13.parse(self, section)
896
+	CTRL.flag_parse(self, section)
897
+end
898
+
899
+-- debug -----------------------------------------------------------------------
900
+local d14	= ns:taboption("debug", Flag, "debug_8192")
901
+d14.title	= string.format(HELP, "DEBUG", "Debug 8192" )
902
+d14.description	= translate("Non-fatal errors - *we highly recommended enabling this*")
903
+d14.rmempty	= true
904
+function d14.parse(self, section)
905
+	CTRL.flag_parse(self, section)
906
+end
907
+
908
+-- debug -----------------------------------------------------------------------
909
+local d15	= ns:taboption("debug", Flag, "debug_32768")
910
+d15.title	= string.format(HELP, "DEBUG", "Debug 32768" )
911
+d15.description	= translate("Log all data read from the network")
912
+d15.rmempty	= true
913
+function d15.parse(self, section)
914
+	CTRL.flag_parse(self, section)
915
+end
916
+
917
+-- debug -----------------------------------------------------------------------
918
+local d16	= ns:taboption("debug", Flag, "debug_65536")
919
+d16.title	= string.format(HELP, "DEBUG", "Debug 65536" )
920
+d16.description	= translate("Log the applying actions")
921
+d16.rmempty	= true
922
+function d16.parse(self, section)
923
+	CTRL.flag_parse(self, section)
924
+end
925
+
926
+-- tab: logview -- #############################################################
927
+
928
+local lv	= ns:taboption("logview", DummyValue, "_logview")
929
+lv.template	= "privoxy/detail_logview"
930
+lv.inputtitle	= translate("Read / Reread log file")
931
+lv.rows		= 50
932
+function lv.cfgvalue(self, section)
933
+	local lfile=self.map:get(ns.section, "logdir") .. "/" .. self.map:get(ns.section, "logfile")
934
+	if NXFS.access(lfile) then
935
+		return lfile .. "\n" .. translate("Please press [Read] button")
936
+	end
937
+	return lfile .. "\n" .. translate("File not found or empty")
938
+end
939
+
940
+return m

+ 56
- 0
net/privoxy-luci/files/luasrc/view/privoxy/detail_logview.htm View File

@@ -0,0 +1,56 @@
1
+
2
+<!-- ++ BEGIN ++ Privoxy ++ detail_logview.htm ++ -->
3
+<script type="text/javascript">//<![CDATA[
4
+	function onclick_logview(section, bottom)  {
5
+		// get elements
6
+		var txt = document.getElementById("cbid.privoxy.privoxy._logview.txt");	// TextArea
7
+		if ( !txt ) { return; }	// security check
8
+		var lvXHR = new XHR();
9
+		lvXHR.get('<%=luci.dispatcher.build_url("admin", "services", "privoxy", "logview")%>', null,
10
+			function(x) {
11
+				if (x.responseText == "_nodata_")
12
+					txt.value = "<%:File not found or empty%>";
13
+				else
14
+					txt.value = x.responseText;
15
+				if (bottom)
16
+					txt.scrollTop = txt.scrollHeight;
17
+				else
18
+					txt.scrollTop = 0;			}
19
+		);
20
+	}
21
+//]]></script>
22
+
23
+<%+cbi/valueheader%>
24
+
25
+<br />
26
+
27
+<%
28
+-- one button on top, one at the buttom
29
+%>
30
+<input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, false)"
31
+<%=
32
+attr("name", section) .. attr("id", cbid .. ".btn1") .. attr("value", self.inputtitle)
33
+%> />
34
+
35
+<br /><br />
36
+
37
+<%
38
+-- set a readable style taken from openwrt theme for textarea#syslog
39
+-- in openwrt theme there are problems with a width of 100 so we check for theme and set to lower value
40
+%>
41
+<textarea style="width: <%if media == "/luci-static/openwrt.org" then%>98.7%<%else%>100%<%end%> ; min-height: 500px; border: 3px solid #cccccc; padding: 5px; font-family: monospace; resize: none;" wrap="off" readonly="readonly"
42
+<%=
43
+attr("name", cbid .. ".txt") .. attr("id", cbid .. ".txt") .. ifattr(self.rows, "rows")
44
+%> >
45
+<%-=pcdata(self:cfgvalue(section))-%>
46
+</textarea>
47
+<br /><br />
48
+
49
+<%
50
+-- one button on top, one at the buttom
51
+%>
52
+<input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, true)"
53
+<%= attr("name", section) .. attr("id", cbid .. ".btn2") .. attr("value", self.inputtitle) %> />
54
+
55
+<%+cbi/valuefooter%>
56
+<!-- ++ END ++ Privoxy ++ detail_logview.htm ++ -->

+ 49
- 0
net/privoxy-luci/files/luasrc/view/privoxy/detail_startstop.htm View File

@@ -0,0 +1,49 @@
1
+
2
+<!-- ++ BEGIN ++ Privoxy ++ detail_startstop.htm ++ -->
3
+<script type="text/javascript">//<![CDATA[
4
+
5
+	// show XHR.poll/XHR.get response on button
6
+	function _data2elements(x) {
7
+		var btn = document.getElementById("cbid.privoxy.privoxy._startstop");
8
+		if ( ! btn ) { return; }	// security check
9
+		if (x.responseText == "0") {
10
+			btn.value = "<%:Start%>";
11
+			btn.className = "cbi-button cbi-button-apply";
12
+			btn.disabled = false;
13
+		} else {
14
+			btn.value = "PID: " + x.responseText;
15
+			btn.className = "cbi-button cbi-button-reset";
16
+			btn.disabled = false;
17
+		}
18
+	}
19
+
20
+	// event handler for start/stop button
21
+	function onclick_startstop(id) {
22
+		// do start/stop
23
+		var btnXHR = new XHR();
24
+		btnXHR.get('<%=luci.dispatcher.build_url("admin", "services", "privoxy", "startstop")%>', null,
25
+			function(x) { _data2elements(x); }
26
+		);
27
+	}
28
+
29
+	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "privoxy", "status")%>', null,
30
+		function(x, data) { _data2elements(x); }
31
+	);
32
+
33
+//]]></script>
34
+
35
+<%+cbi/valueheader%>
36
+
37
+<% if self:cfgvalue(section) ~= false then
38
+-- We need to garantie that function cfgvalue run first to set missing parameters
39
+%>
40
+	<!-- style="font-size: 100%;" needed for openwrt theme to fix font size -->
41
+	<!-- type="button" onclick="..." enable standard onclick functionalty   -->
42
+	<input class="cbi-button cbi-input-<%=self.inputstyle or "button" %>" style="font-size: 100%;" type="button" onclick="onclick_startstop(this.id)"
43
+	<%=
44
+	attr("name", section) .. attr("id", cbid) .. attr("value", self.inputtitle) .. ifattr(self.disabled, "disabled")
45
+	%> />
46
+<% end %>
47
+
48
+<%+cbi/valuefooter%>
49
+<!-- ++ END ++ Privoxy ++ detail_startstop.htm ++ -->

+ 12
- 0
net/privoxy-luci/files/root/etc/uci-defaults/luci-privoxy View File

@@ -0,0 +1,12 @@
1
+#!/bin/sh
2
+
3
+# no longer needed for "Save and Apply" to restart privoxy
4
+# luci-app-privoxy calls /etc/init.d/preivoxy reload
5
+uci -q batch <<-EOF >/dev/null
6
+	delete ucitrack.@privoxy[-1]
7
+	commit ucitrack
8
+EOF
9
+
10
+rm -f /tmp/luci-indexcache
11
+
12
+exit 0

+ 490
- 0
net/privoxy-luci/po/de/privoxy.po View File

@@ -0,0 +1,490 @@
1
+msgid ""
2
+msgstr ""
3
+"Project-Id-Version: luci-app-privoxy\n"
4
+"POT-Creation-Date: 2014-12-13 22:34:49\n"
5
+"PO-Revision-Date: 2014-12-20 14:57+0100\n"
6
+"Last-Translator: Christian Schoenebeck <christian.schoenebeck@gmail.com>\n"
7
+"Language-Team: Christian Schoenebeck <christian.schoenebeck@gmail.com>\n"
8
+"Language: de\n"
9
+"MIME-Version: 1.0\n"
10
+"Content-Type: text/plain; charset=UTF-8\n"
11
+"Content-Transfer-Encoding: 8bit\n"
12
+"X-Generator: Poedit 1.5.4\n"
13
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
+"X-Poedit-SourceCharset: UTF-8\n"
15
+
16
+msgid ""
17
+"A URL to be displayed in the error page that users will see if access to an "
18
+"untrusted page is denied."
19
+msgstr ""
20
+"Ein Link auf der Fehlerseite, der Benutzern angezeigt wird, wenn der Zugang "
21
+"zu einer nicht vertrauenswürdigen Seite verweigert wird."
22
+
23
+msgid ""
24
+"A URL to documentation about the local Privoxy setup, configuration or "
25
+"policies."
26
+msgstr ""
27
+"Ein Link zur Dokumentation über die lokale Privoxy Konfiguration und die "
28
+"Sicherheitseinstellungen."
29
+
30
+msgid "Access Control"
31
+msgstr "Zugriffskontrolle"
32
+
33
+msgid "Actions that are applied to all sites and maybe overruled later on."
34
+msgstr ""
35
+"Aktionen, die für alle Websites angewendet werden, und vielleicht später "
36
+"überschrieben werden."
37
+
38
+msgid "An alternative directory where the templates are loaded from."
39
+msgstr "Eine alternatives Verzeichnis, aus dem die Vorlagen geladen werden."
40
+
41
+msgid "An email address to reach the Privoxy administrator."
42
+msgstr "Eine E-Mail-Adresse, um die Privoxy-Administrator zu erreichen."
43
+
44
+msgid ""
45
+"Assumed server-side keep-alive timeout (in seconds) if not specified by the "
46
+"server."
47
+msgstr ""
48
+"Angenommenes serverseitiges Keep-Alive-Timeout (in Sekunden), falls nicht "
49
+"vom Server festgelegt."
50
+
51
+msgid "Build"
52
+msgstr "Build"
53
+
54
+msgid "CGI user interface"
55
+msgstr "Protokolliert die CGI Benutzer Schnittstelle"
56
+
57
+msgid "Common Log Format"
58
+msgstr "Gemeinsames Protokollformat"
59
+
60
+msgid ""
61
+"Configure here the routing of HTTP requests through a chain of multiple "
62
+"proxies. Note that parent proxies can severely decrease your privacy level. "
63
+"Also specified here are SOCKS proxies."
64
+msgstr ""
65
+"Konfigurieren Sie hier das Weiterleiten von HTTP-Anforderungen durch eine "
66
+"Kette von mehreren Proxies. Beachten Sie, dass  übergeordnete Proxies Ihre "
67
+"Privatsphäre stark verringern können. Auch hier angegeben werden SOCKS-"
68
+"Proxies."
69
+
70
+msgid "Debug GIF de-animation"
71
+msgstr "Protokolliert die GIF de-animation"
72
+
73
+msgid "Debug force feature"
74
+msgstr "Protokolliert die 'Force' Eigenschaft"
75
+
76
+msgid "Debug redirects"
77
+msgstr "Protokolliert Weiterleitungen"
78
+
79
+msgid "Debug regular expression filters"
80
+msgstr "Protokolliert Filter für reguläre Ausdrücke"
81
+
82
+msgid "Directory does not exist!"
83
+msgstr "Verzeichnis existiert nicht!"
84
+
85
+msgid "Disabled == Transparent Proxy Mode"
86
+msgstr "Deaktiviert == Transparent Proxy Betrieb"
87
+
88
+msgid "Enable proxy authentication forwarding"
89
+msgstr "Aktivieren die Weiterleitung von Proxy-Authentifizierungen"
90
+
91
+msgid ""
92
+"Enable/Disable autostart of Privoxy on system startup and interface events"
93
+msgstr ""
94
+"Aktivieren / Deaktivieren des Autostart von Privoxy beim Systemstart und "
95
+"Schnittstellenereignissen."
96
+
97
+msgid "Enable/Disable filtering when Privoxy starts."
98
+msgstr "Aktivieren / Deaktivieren der Filterung, wenn Privoxy startet."
99
+
100
+msgid ""
101
+"Enabling this option is NOT recommended if there is no parent proxy that "
102
+"requires authentication!"
103
+msgstr ""
104
+"Die Aktivierung dieser Option wird NICHT empfohlen, wenn es keinen "
105
+"übergeordneten Proxy gibt, der eine Authentifizierung erfordert!"
106
+
107
+msgid "File '%s' not found inside Configuration Directory"
108
+msgstr "Datei '%s' nicht im Konfigurationsverzeichnis gefunden!"
109
+
110
+msgid "File not found or empty"
111
+msgstr "Datei nicht gefunden oder leer"
112
+
113
+msgid "Files and Directories"
114
+msgstr "Dateien und Verzeichnisse"
115
+
116
+msgid "For help use link at the relevant option"
117
+msgstr ""
118
+"Für Hilfe zur Verwendung, benutzen Sie die Verknüpfung der betreffenden "
119
+"Option."
120
+
121
+msgid "Forwarding"
122
+msgstr "Weiterleitung"
123
+
124
+msgid ""
125
+"If enabled, Privoxy hides the 'go there anyway' link. The user obviously "
126
+"should not be able to bypass any blocks."
127
+msgstr ""
128
+"Wenn aktiviert, verbirgt Privoxy den Link 'go there anyway'. Normalerweise "
129
+"sollten Benutzer nicht in der Lage sein, Blockierungen zu umgehen."
130
+
131
+msgid ""
132
+"If you intend to operate Privoxy for more users than just yourself, it might "
133
+"be a good idea to let them know how to reach you, what you block and why you "
134
+"do that, your policies, etc."
135
+msgstr ""
136
+"Wenn Sie beabsichtigen, Privoxy für mehr Nutzer als nur sich selbst zu "
137
+"betreiben, ist es eine gute Idee, sie wissen zu lassen, wie sie Sie "
138
+"erreichen können, was Sie blockieren und warum Sie das tun, etc."
139
+
140
+msgid "Invalid email address"
141
+msgstr "Ungültige Email Adresse"
142
+
143
+msgid "It is NOT recommended for the casual user."
144
+msgstr "Es wird NICHT für den gelegentlichen Anwender empfohlen."
145
+
146
+msgid "Local Set-up"
147
+msgstr "Lokale Einstellungen"
148
+
149
+msgid "Location of the Privoxy User Manual."
150
+msgstr "Ort des Privoxy Benutzer Handbuches"
151
+
152
+msgid "Log File Viewer"
153
+msgstr "Protokolldatei"
154
+
155
+msgid "Log all data read from the network"
156
+msgstr "Protokolliert alle Daten, die vom Netzwerk gelesen werden."
157
+
158
+msgid "Log all data written to the network"
159
+msgstr "Protokolliert alle Daten, die auf das Netzwerk geschrieben werden."
160
+
161
+msgid "Log the applying actions"
162
+msgstr "Protokiolliert angewendete Aktionen"
163
+
164
+msgid ""
165
+"Log the destination for each request Privoxy let through. See also 'Debug "
166
+"1024'."
167
+msgstr ""
168
+"Protokolliert das Ziel für jede Anforderung die Privoxy durchlässt. Siehe "
169
+"auch 'Debug 1024'."
170
+
171
+msgid ""
172
+"Log the destination for requests Privoxy didn't let through, and the reason "
173
+"why."
174
+msgstr ""
175
+"Protokolliert das Ziel für Anfragen die Privoxy nicht durchgelassen hat, und "
176
+"den Grund dafür."
177
+
178
+msgid "Main actions file"
179
+msgstr "Wichtige Aktionen-Datei"
180
+
181
+msgid "Mandatory Input: No Data given!"
182
+msgstr "Pflichtfeld: Keine Daten angegeben!"
183
+
184
+msgid "Mandatory Input: No Directory given!"
185
+msgstr "Pflichtfeld: Kein Verzeichnis angegeben!"
186
+
187
+msgid "Mandatory Input: No File given!"
188
+msgstr "Pflichtfeld: Keine Datei angegeben!"
189
+
190
+msgid "Mandatory Input: No Port given!"
191
+msgstr "Pflichtfeld: Kein Port angegeben!"
192
+
193
+msgid "Mandatory Input: No files given!"
194
+msgstr "Pflichtfeld: Keine Dateien angegeben!"
195
+
196
+msgid "Mandatory Input: No valid IPv4 address or host given!"
197
+msgstr ""
198
+"Pflichtfeld: Keine gültige IPv4 Adresse oder gültiger Hostname angegeben!"
199
+
200
+msgid "Mandatory Input: No valid IPv6 address given!"
201
+msgstr "Pflichtfeld: Keine gültige IPv6 Adresse angegeben!"
202
+
203
+msgid "Mandatory Input: No valid Port given!"
204
+msgstr "Pflichtfeld: Keine gültige Port Nummer angegeben!"
205
+
206
+msgid "Maximum number of client connections that will be served."
207
+msgstr "Maximale Anzahl von Client-Verbindungen."
208
+
209
+msgid "Maximum size (in KB) of the buffer for content filtering."
210
+msgstr "Maximale Größe (in KB) des Puffers für die Inhaltsfilterung."
211
+
212
+msgid "Miscellaneous"
213
+msgstr "Verschiedenes"
214
+
215
+msgid "No trailing '/', please."
216
+msgstr "Bitte kein '/' am Ende."
217
+
218
+msgid "Non-fatal errors - *we highly recommended enabling this*"
219
+msgstr ""
220
+"Protokolliert nicht schwerwiegende Fehler - * Es wird dringend empfohlen, "
221
+"dieses zu aktivieren *"
222
+
223
+msgid ""
224
+"Number of seconds after which a socket times out if no data is received."
225
+msgstr ""
226
+"Anzahl der Sekunden, nach der eine Socket Timeout erfolgt, wenn keine Daten "
227
+"empfangen werden."
228
+
229
+msgid ""
230
+"Number of seconds after which an open connection will no longer be reused."
231
+msgstr ""
232
+"Anzahl von Sekunden, nach der eine offene Verbindung nicht mehr "
233
+"wiederverwendet wird."
234
+
235
+msgid "Please press [Read] button"
236
+msgstr "Bitte Protokolldatei einlesen"
237
+
238
+msgid "Please read Privoxy manual for details!"
239
+msgstr "Bitte lesen Sie das Privoxy Handbuch für Details!"
240
+
241
+msgid "Please update to the current version!"
242
+msgstr "Aktualisieren Sie bitte auf die aktuelle Version!"
243
+
244
+msgid "Privoxy WEB proxy"
245
+msgstr "Privoxy WEB proxy"
246
+
247
+msgid ""
248
+"Privoxy can (and normally does) use a number of other files for additional "
249
+"configuration, help and logging. This section of the configuration file "
250
+"tells Privoxy where to find those other files."
251
+msgstr ""
252
+"Privoxy verwendet  (was in der Regel der Fall ist), eine Reihe von anderen "
253
+"Dateien für eine zusätzliche Konfiguration, Hilfe und Protokollierung. "
254
+"Dieser Abschnitt der Konfigurationsdatei definiert, wo diese Dateien zu "
255
+"finden sind."
256
+
257
+msgid ""
258
+"Privoxy is a non-caching web proxy with advanced filtering capabilities for "
259
+"enhancing privacy, modifying web page data and HTTP headers, controlling "
260
+"access, and removing ads and other obnoxious Internet junk."
261
+msgstr ""
262
+"Privoxy ist ein non-caching Web-Proxy mit erweiterten Filterfunktion zur "
263
+"Verbesserung der Privatsphäre. Er modifiziert Webseitendaten und HTTP-"
264
+"Header, kontrolliert den Zugang und das Entfernen von Anzeigen und anderem "
265
+"abscheulichen Internet Schrott."
266
+
267
+msgid "Read / Reread log file"
268
+msgstr "Protokolldatei (neu) lesen"
269
+
270
+msgid "Show I/O status"
271
+msgstr "Protokolliert den I/O Status"
272
+
273
+msgid "Show each connection status"
274
+msgstr "Protokolliert jeden Verbindungsstatus"
275
+
276
+msgid "Show header parsing"
277
+msgstr "Protokolliert das 'Header parsing'"
278
+
279
+msgid "Software update required"
280
+msgstr "Softwareaktualisierung nötig"
281
+
282
+msgid "Start / Stop"
283
+msgstr "Start / Stopp"
284
+
285
+msgid "Start/Stop Privoxy WEB Proxy"
286
+msgstr "Start/Stopp Privoxy WEB Proxy"
287
+
288
+msgid "Startup banner and warnings."
289
+msgstr "Protokolliert Start-Meldungen und Warnungen"
290
+
291
+msgid "Syntax:"
292
+msgstr "Syntax:"
293
+
294
+msgid "Syntax: Client header names delimited by spaces."
295
+msgstr "Syntax: Client header Namen getrennt durch Leerzeichen."
296
+
297
+msgid "Syntax: target_pattern http_parent[:port]"
298
+msgstr "Syntax: target_pattern http_parent[:port]"
299
+
300
+msgid "Syntax: target_pattern socks_proxy[:port] http_parent[:port]"
301
+msgstr "Syntax: target_pattern socks_proxy[:port] http_parent[:port]"
302
+
303
+msgid ""
304
+"The actions file(s) to use. Multiple actionsfile lines are permitted, and "
305
+"are in fact recommended!"
306
+msgstr ""
307
+"Die zu verwendenden Aktion-Datei(en). Mehrere Dateien sind gestattet und "
308
+"empfohlen!"
309
+
310
+msgid ""
311
+"The address and TCP port on which Privoxy will listen for client requests."
312
+msgstr ""
313
+"Die Adresse und das TCP-Port, auf dem Privoxy auf Client-Anforderungen "
314
+"wartet."
315
+
316
+msgid ""
317
+"The compression level that is passed to the zlib library when compressing "
318
+"buffered content."
319
+msgstr ""
320
+"Die Komprimierungsstufe (0-9), die der zlib-Bibliothek beim Komprimieren "
321
+"gepufferten Inhaltes übergeben wird."
322
+
323
+msgid ""
324
+"The currently installed 'privoxy' package is not supported by LuCI "
325
+"application."
326
+msgstr ""
327
+"Das aktuell installierte \"privoxy' Paket wird von dieser LuCI Anwendung "
328
+"NICHT unterstützt."
329
+
330
+msgid ""
331
+"The directory where all logging takes place (i.e. where the logfile is "
332
+"located)."
333
+msgstr "Das Verzeichnis in dem die Protokolldatei gespeichert wird."
334
+
335
+msgid "The directory where the other configuration files are located."
336
+msgstr "Das Verzeichnis in dem weitere Konfigurationsdateien gespeichert sind."
337
+
338
+msgid ""
339
+"The filter files contain content modification rules that use regular "
340
+"expressions."
341
+msgstr ""
342
+"Die Filterdateien enthalten Änderung des Inhalts, die reguläre Ausdrücke "
343
+"als  Regeln verwenden."
344
+
345
+msgid "The hostname shown on the CGI pages."
346
+msgstr "Der Hostname der auf CGI-Seiten angezeigt wird."
347
+
348
+msgid "The log file to use. File name, relative to log directory."
349
+msgstr ""
350
+"Zu verwendende Protokolldatei. Dateiname relativ zum Protokoll-Verzeichnis."
351
+
352
+msgid "The order in which client headers are sorted before forwarding them."
353
+msgstr ""
354
+"Die Reihenfolge, in der Client-Header sortiert werden, bevor sie "
355
+"weitergeleitet werden."
356
+
357
+msgid ""
358
+"The status code Privoxy returns for pages blocked with +handle-as-empty-"
359
+"document."
360
+msgstr ""
361
+"Ob Statuscode 200(OK) oder 403(forbidden) für Seiten gemeldet wird, die "
362
+"durch den Filter 'handle-as-empty-document' blockiert werden."
363
+
364
+msgid ""
365
+"The trust mechanism is an experimental feature for building white-lists and "
366
+"should be used with care."
367
+msgstr ""
368
+"Der Trust-Mechanismus ist eine experimentelle Funktion für den Aufbau von "
369
+"White-Listen und sollte mit Vorsicht verwendet werden."
370
+
371
+msgid ""
372
+"The value of this option only matters if the experimental trust mechanism "
373
+"has been activated."
374
+msgstr ""
375
+"Der Wert dieser Option ist nur wirksam, wenn der experimentelle Trust-"
376
+"Mechanismus aktiviert wurde."
377
+
378
+msgid ""
379
+"This option is only there for debugging purposes. It will drastically reduce "
380
+"performance."
381
+msgstr ""
382
+"Diese Option ist ausschließlich zur Fehlersuche. Es wird drastisch die "
383
+"Leistung beeinträchtigt."
384
+
385
+msgid ""
386
+"This option will be removed in future releases as it has been obsoleted by "
387
+"the more general header taggers."
388
+msgstr "Diese Option wird in zukünftigen Versionen entfernt werden."
389
+
390
+msgid ""
391
+"This tab controls the security-relevant aspects of Privoxy's configuration."
392
+msgstr ""
393
+"Diese Registerkarte steuert die sicherheitsrelevanten Aspekte der Privoxy "
394
+"Konfiguration."
395
+
396
+msgid ""
397
+"Through which SOCKS proxy (and optionally to which parent HTTP proxy) "
398
+"specific requests should be routed."
399
+msgstr ""
400
+"An welchen SOCKS-Proxy (und gegebenenfalls an welchen übergeordneten HTTP-"
401
+"Proxy) spezifischen Anforderungen weitergeleitet werden."
402
+
403
+msgid "To which parent HTTP proxy specific requests should be routed."
404
+msgstr ""
405
+"An welchen übergeordneten HTTP-Proxy spezifischen Anforderungen "
406
+"weitergeleitet werden."
407
+
408
+msgid "User customizations"
409
+msgstr "Benutzerdefinierte Anpassungen"
410
+
411
+msgid "Value is not a number"
412
+msgstr "Eingabe ist keine Zahl"
413
+
414
+msgid "Value not between 0 and 9"
415
+msgstr "Wert nicht zwischen 0 und 9"
416
+
417
+msgid "Value not between 1 and 4096"
418
+msgstr "Wert nicht zwischen 1 und 4096"
419
+
420
+msgid "Value not greater 0 or empty"
421
+msgstr "Wert nicht größer 0 oder leer"
422
+
423
+msgid "Value range 1 to 4096, no entry defaults to 4096"
424
+msgstr "Wertebereich: 1 bis 4096; Keine Angabe setzt 4096."
425
+
426
+msgid "Version Information"
427
+msgstr "Versionsinformation"
428
+
429
+msgid "Whether intercepted requests should be treated as valid."
430
+msgstr "Ob abgefangen Anfragen als gültig behandelt werden."
431
+
432
+msgid ""
433
+"Whether or not Privoxy recognizes special HTTP headers to change its "
434
+"behaviour."
435
+msgstr ""
436
+"Ob Privoxy erkannte spezielle HTTP-Header in ihrer Bedeutung ändert oder "
437
+"nicht."
438
+
439
+msgid "Whether or not buffered content is compressed before delivery."
440
+msgstr ""
441
+"Ob gepufferte Inhalte vor der Weiterleitung komprimiert werden oder nicht."
442
+
443
+msgid ""
444
+"Whether or not outgoing connections that have been kept alive should be "
445
+"shared between different incoming connections."
446
+msgstr ""
447
+"Ob ausgehende Verbindungen, die am Leben gehalten werden, für verschiedenen "
448
+"eingehenden Verbindungen gemeinsam genutzt werden oder nicht."
449
+
450
+msgid "Whether or not pipelined requests should be served."
451
+msgstr "Ob Pipeline-Anfragen bedient werden oder nicht."
452
+
453
+msgid "Whether or not proxy authentication through Privoxy should work."
454
+msgstr ""
455
+"Ob Proxy-Authentifizierungen durch Privoxy weitergeleitet werden oder nicht."
456
+
457
+msgid "Whether or not the web-based actions file editor may be used."
458
+msgstr "De-/Aktiviert den webbasierte Action-Datei Editor."
459
+
460
+msgid "Whether or not the web-based toggle feature may be used."
461
+msgstr "De-Aktiviert die webbasierte Umschaltfunktion."
462
+
463
+msgid "Whether requests to Privoxy's CGI pages can be blocked or redirected."
464
+msgstr ""
465
+"Ob Anfragen an Privoxy CGI-Seiten gesperrt oder umgeleitet werden können "
466
+"oder nicht."
467
+
468
+msgid ""
469
+"Whether the CGI interface should stay compatible with broken HTTP clients."
470
+msgstr ""
471
+"Ob die CGI-Schnittstelle mit broken HTTP-Clients kompatibel bleibt oder "
472
+"nicht."
473
+
474
+msgid "Whether to run only one server thread."
475
+msgstr "Ob nur ein Server-Thread ausgeführt wird."
476
+
477
+msgid "Who can access what."
478
+msgstr "Wer kann auf Was zugreifen."
479
+
480
+msgid "installed"
481
+msgstr "installiert"
482
+
483
+msgid "or greater"
484
+msgstr "oder groeßer"
485
+
486
+msgid "or higher"
487
+msgstr "oder höher"
488
+
489
+msgid "required"
490
+msgstr "benötigt"

+ 399
- 0
net/privoxy-luci/po/templates/privoxy.pot View File

@@ -0,0 +1,399 @@
1
+msgid ""
2
+msgstr "Content-Type: text/plain; charset=UTF-8"
3
+
4
+msgid ""
5
+"A URL to be displayed in the error page that users will see if access to an "
6
+"untrusted page is denied."
7
+msgstr ""
8
+
9
+msgid ""
10
+"A URL to documentation about the local Privoxy setup, configuration or "
11
+"policies."
12
+msgstr ""
13
+
14
+msgid "Access Control"
15
+msgstr ""
16
+
17
+msgid "Actions that are applied to all sites and maybe overruled later on."
18
+msgstr ""
19
+
20
+msgid "An alternative directory where the templates are loaded from."
21
+msgstr ""
22
+
23
+msgid "An email address to reach the Privoxy administrator."
24
+msgstr ""
25
+
26
+msgid ""
27
+"Assumed server-side keep-alive timeout (in seconds) if not specified by the "
28
+"server."
29
+msgstr ""
30
+
31
+msgid "Build"
32
+msgstr ""
33
+
34
+msgid "CGI user interface"
35
+msgstr ""
36
+
37
+msgid "Common Log Format"
38
+msgstr ""
39
+
40
+msgid ""
41
+"Configure here the routing of HTTP requests through a chain of multiple "
42
+"proxies. Note that parent proxies can severely decrease your privacy level. "
43
+"Also specified here are SOCKS proxies."
44
+msgstr ""
45
+
46
+msgid "Debug GIF de-animation"
47
+msgstr ""
48
+
49
+msgid "Debug force feature"
50
+msgstr ""
51
+
52
+msgid "Debug redirects"
53
+msgstr ""
54
+
55
+msgid "Debug regular expression filters"
56
+msgstr ""
57
+
58
+msgid "Directory does not exist!"
59
+msgstr ""
60
+
61
+msgid "Disabled == Transparent Proxy Mode"
62
+msgstr ""
63
+
64
+msgid "Enable proxy authentication forwarding"
65
+msgstr ""
66
+
67
+msgid ""
68
+"Enable/Disable autostart of Privoxy on system startup and interface events"
69
+msgstr ""
70
+
71
+msgid "Enable/Disable filtering when Privoxy starts."
72
+msgstr ""
73
+
74
+msgid ""
75
+"Enabling this option is NOT recommended if there is no parent proxy that "
76
+"requires authentication!"
77
+msgstr ""
78
+
79
+msgid "File '%s' not found inside Configuration Directory"
80
+msgstr ""
81
+
82
+msgid "File not found or empty"
83
+msgstr ""
84
+
85
+msgid "Files and Directories"
86
+msgstr ""
87
+
88
+msgid "For help use link at the relevant option"
89
+msgstr ""
90
+
91
+msgid "Forwarding"
92
+msgstr ""
93
+
94
+msgid ""
95
+"If enabled, Privoxy hides the 'go there anyway' link. The user obviously "
96
+"should not be able to bypass any blocks."
97
+msgstr ""
98
+
99
+msgid ""
100
+"If you intend to operate Privoxy for more users than just yourself, it might "
101
+"be a good idea to let them know how to reach you, what you block and why you "
102
+"do that, your policies, etc."
103
+msgstr ""
104
+
105
+msgid "Invalid email address"
106
+msgstr ""
107
+
108
+msgid "It is NOT recommended for the casual user."
109
+msgstr ""
110
+
111
+msgid "Local Set-up"
112
+msgstr ""
113
+
114
+msgid "Location of the Privoxy User Manual."
115
+msgstr ""
116
+
117
+msgid "Log File Viewer"
118
+msgstr ""
119
+
120
+msgid "Log all data read from the network"
121
+msgstr ""
122
+
123
+msgid "Log all data written to the network"
124
+msgstr ""
125
+
126
+msgid "Log the applying actions"
127
+msgstr ""
128
+
129
+msgid ""
130
+"Log the destination for each request Privoxy let through. See also 'Debug "
131
+"1024'."
132
+msgstr ""
133
+
134
+msgid ""
135
+"Log the destination for requests Privoxy didn't let through, and the reason "
136
+"why."
137
+msgstr ""
138
+
139
+msgid "Main actions file"
140
+msgstr ""
141
+
142
+msgid "Mandatory Input: No Data given!"
143
+msgstr ""
144
+
145
+msgid "Mandatory Input: No Directory given!"
146
+msgstr ""
147
+
148
+msgid "Mandatory Input: No File given!"
149
+msgstr ""
150
+
151
+msgid "Mandatory Input: No Port given!"
152
+msgstr ""
153
+
154
+msgid "Mandatory Input: No files given!"
155
+msgstr ""
156
+
157
+msgid "Mandatory Input: No valid IPv4 address or host given!"
158
+msgstr ""
159
+
160
+msgid "Mandatory Input: No valid IPv6 address given!"
161
+msgstr ""
162
+
163
+msgid "Mandatory Input: No valid Port given!"
164
+msgstr ""
165
+
166
+msgid "Maximum number of client connections that will be served."
167
+msgstr ""
168
+
169
+msgid "Maximum size (in KB) of the buffer for content filtering."
170
+msgstr ""
171
+
172
+msgid "Miscellaneous"
173
+msgstr ""
174
+
175
+msgid "No trailing '/', please."
176
+msgstr ""
177
+
178
+msgid "Non-fatal errors - *we highly recommended enabling this*"
179
+msgstr ""
180
+
181
+msgid ""
182
+"Number of seconds after which a socket times out if no data is received."
183
+msgstr ""
184
+
185
+msgid ""
186
+"Number of seconds after which an open connection will no longer be reused."
187
+msgstr ""
188
+
189
+msgid "Please press [Read] button"
190
+msgstr ""
191
+
192
+msgid "Please read Privoxy manual for details!"
193
+msgstr ""
194
+
195
+msgid "Please update to the current version!"
196
+msgstr ""
197
+
198
+msgid "Privoxy WEB proxy"
199
+msgstr ""
200
+
201
+msgid ""
202
+"Privoxy can (and normally does) use a number of other files for additional "
203
+"configuration, help and logging. This section of the configuration file "
204
+"tells Privoxy where to find those other files."
205
+msgstr ""
206
+
207
+msgid ""
208
+"Privoxy is a non-caching web proxy with advanced filtering capabilities for "
209
+"enhancing privacy, modifying web page data and HTTP headers, controlling "
210
+"access, and removing ads and other obnoxious Internet junk."
211
+msgstr ""
212
+
213
+msgid "Read / Reread log file"
214
+msgstr ""
215
+
216
+msgid "Show I/O status"
217
+msgstr ""
218
+
219
+msgid "Show each connection status"
220
+msgstr ""
221
+
222
+msgid "Show header parsing"
223
+msgstr ""
224
+
225
+msgid "Software update required"
226
+msgstr ""
227
+
228
+msgid "Start / Stop"
229
+msgstr ""
230
+
231
+msgid "Start/Stop Privoxy WEB Proxy"
232
+msgstr ""
233
+
234
+msgid "Startup banner and warnings."
235
+msgstr ""
236
+
237
+msgid "Syntax:"
238
+msgstr ""
239
+
240
+msgid "Syntax: Client header names delimited by spaces."
241
+msgstr ""
242
+
243
+msgid "Syntax: target_pattern http_parent[:port]"
244
+msgstr ""
245
+
246
+msgid "Syntax: target_pattern socks_proxy[:port] http_parent[:port]"
247
+msgstr ""
248
+
249
+msgid ""
250
+"The actions file(s) to use. Multiple actionsfile lines are permitted, and "
251
+"are in fact recommended!"
252
+msgstr ""
253
+
254
+msgid ""
255
+"The address and TCP port on which Privoxy will listen for client requests."
256
+msgstr ""
257
+
258
+msgid ""
259
+"The compression level that is passed to the zlib library when compressing "
260
+"buffered content."
261
+msgstr ""
262
+
263
+msgid ""
264
+"The currently installed 'privoxy' package is not supported by LuCI "
265
+"application."
266
+msgstr ""
267
+
268
+msgid ""
269
+"The directory where all logging takes place (i.e. where the logfile is "
270
+"located)."
271
+msgstr ""
272
+
273
+msgid "The directory where the other configuration files are located."
274
+msgstr ""
275
+
276
+msgid ""
277
+"The filter files contain content modification rules that use regular "
278
+"expressions."
279
+msgstr ""
280
+
281
+msgid "The hostname shown on the CGI pages."
282
+msgstr ""
283
+
284
+msgid "The log file to use. File name, relative to log directory."
285
+msgstr ""
286
+
287
+msgid "The order in which client headers are sorted before forwarding them."
288
+msgstr ""
289
+
290
+msgid ""
291
+"The status code Privoxy returns for pages blocked with +handle-as-empty-"
292
+"document."
293
+msgstr ""
294
+
295
+msgid ""
296
+"The trust mechanism is an experimental feature for building white-lists and "
297
+"should be used with care."
298
+msgstr ""
299
+
300
+msgid ""
301
+"The value of this option only matters if the experimental trust mechanism "
302
+"has been activated."
303
+msgstr ""
304
+
305
+msgid ""
306
+"This option is only there for debugging purposes. It will drastically reduce "
307
+"performance."
308
+msgstr ""
309
+
310
+msgid ""
311
+"This option will be removed in future releases as it has been obsoleted by "
312
+"the more general header taggers."
313
+msgstr ""
314
+
315
+msgid ""
316
+"This tab controls the security-relevant aspects of Privoxy's configuration."
317
+msgstr ""
318
+
319
+msgid ""
320
+"Through which SOCKS proxy (and optionally to which parent HTTP proxy) "
321
+"specific requests should be routed."
322
+msgstr ""
323
+
324
+msgid "To which parent HTTP proxy specific requests should be routed."
325
+msgstr ""
326
+
327
+msgid "User customizations"
328
+msgstr ""
329
+
330
+msgid "Value is not a number"
331
+msgstr ""
332
+
333
+msgid "Value not between 0 and 9"
334
+msgstr ""
335
+
336
+msgid "Value not between 1 and 4096"
337
+msgstr ""
338
+
339
+msgid "Value not greater 0 or empty"
340
+msgstr ""
341
+
342
+msgid "Value range 1 to 4096, no entry defaults to 4096"
343
+msgstr ""
344
+
345
+msgid "Version Information"
346
+msgstr ""
347
+
348
+msgid "Whether intercepted requests should be treated as valid."
349
+msgstr ""
350
+
351
+msgid ""
352
+"Whether or not Privoxy recognizes special HTTP headers to change its "
353
+"behaviour."
354
+msgstr ""
355
+
356
+msgid "Whether or not buffered content is compressed before delivery."
357
+msgstr ""
358
+
359
+msgid ""
360
+"Whether or not outgoing connections that have been kept alive should be "
361
+"shared between different incoming connections."
362
+msgstr ""
363
+
364
+msgid "Whether or not pipelined requests should be served."
365
+msgstr ""
366
+
367
+msgid "Whether or not proxy authentication through Privoxy should work."
368
+msgstr ""
369
+
370
+msgid "Whether or not the web-based actions file editor may be used."
371
+msgstr ""
372
+
373
+msgid "Whether or not the web-based toggle feature may be used."
374
+msgstr ""
375
+
376
+msgid "Whether requests to Privoxy's CGI pages can be blocked or redirected."
377
+msgstr ""
378
+
379
+msgid ""
380
+"Whether the CGI interface should stay compatible with broken HTTP clients."
381
+msgstr ""
382
+
383
+msgid "Whether to run only one server thread."
384
+msgstr ""
385
+
386
+msgid "Who can access what."
387
+msgstr ""
388
+
389
+msgid "installed"
390
+msgstr ""
391
+
392
+msgid "or greater"
393
+msgstr ""
394
+
395
+msgid "or higher"
396
+msgstr ""
397
+
398
+msgid "required"
399
+msgstr ""