From: Steven Barth Date: Fri, 3 Oct 2008 16:28:28 +0000 (+0000) Subject: Backported Tinyproxy application X-Git-Tag: 0.8.0~21 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=35f3c609568c9ac1a6df5ac5496f4391c363970b;p=project%2Fluci.git Backported Tinyproxy application --- diff --git a/applications/luci-tinyproxy/Makefile b/applications/luci-tinyproxy/Makefile new file mode 100644 index 0000000000..81a96f6a83 --- /dev/null +++ b/applications/luci-tinyproxy/Makefile @@ -0,0 +1,2 @@ +include ../../build/config.mk +include ../../build/module.mk \ No newline at end of file diff --git a/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua b/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua new file mode 100644 index 0000000000..2ecfb9383e --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua @@ -0,0 +1,25 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- +module("luci.controller.tinyproxy", package.seeall) + +function index() + if not luci.fs.isfile("/etc/config/tinyproxy") then + return + end + + local page = entry({"admin", "services", "tinyproxy"}, cbi("tinyproxy"), "Tinyproxy") + page.dependent = true + page.i18n = "tinyproxy" +end \ No newline at end of file diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua new file mode 100644 index 0000000000..5aaafe488e --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua @@ -0,0 +1,32 @@ +tinyproxy = 'Tinyproxy' +tinyproxy_desc = 'Tinyproxy ist ein schlanker HTTP(S)-Proxy ohne Zwischenspeicher' +tinyproxy_tinyproxy_allow = 'Proxyzugang erlauben von' +tinyproxy_tinyproxy_anonymous = 'Erlaube Header für anonymen Proxy' +tinyproxy_tinyproxy_bind = 'Ausgehendenden Verkehr an Adresse binden' +tinyproxy_tinyproxy_connectport = 'Ports für CONNECT-Methode' +tinyproxy_tinyproxy_connectport_desc = '0 = deaktiviert, leer = alle' +tinyproxy_tinyproxy_defaulterrorfile = 'Fehlerseite' +tinyproxy_tinyproxy_filter = 'Filterliste' +tinyproxy_tinyproxy_filtercasesensitive = 'Filter unterscheiden Groß-/Kleinschreibung' +tinyproxy_tinyproxy_filterdefaultdeny = 'Filterliste ist eine Whitelist' +tinyproxy_tinyproxy_filterextended = 'Erweiterte reguläre Ausdrücke für Filter' +tinyproxy_tinyproxy_filterurls = 'Filtere URLs statt Domains' +tinyproxy_tinyproxy_listen = 'An Adresse binden' +tinyproxy_tinyproxy_logfile = 'Protokolldatei' +tinyproxy_tinyproxy_loglevel = 'Protokolllevel' +tinyproxy_tinyproxy_maxclients = 'Maximale Anzahl an Clients' +tinyproxy_tinyproxy_maxrequestsperchild = 'Maximale Anfragen pro Prozess' +tinyproxy_tinyproxy_maxspareservers = 'Max. Prozesszahl' +tinyproxy_tinyproxy_minspareservers = 'Min. Prozesszahl' +tinyproxy_tinyproxy_startservers = 'Anfängliche Prozesszahl' +tinyproxy_tinyproxy_statfile = 'Statistikseite' +tinyproxy_tinyproxy_syslog = 'In Systemprotokoll schreiben' +tinyproxy_tinyproxy_timeout = 'Verbindungstimeout' +tinyproxy_tinyproxy_viaproxyname = 'Wert des Via-Headers' +tinyproxy_tinyproxy_xtinyproxy = 'Client-IP übertragen' +tinyproxy_type_proxy = 'Über Proxy' +tinyproxy_type_reject = 'Verbiete Zugriff' +tinyproxy_upstream = 'Zugangskontrolle' +tinyproxy_upstream_target = 'Zielhost' +tinyproxy_upstream_type = 'Methode' +tinyproxy_upstream_via = 'Zugangsproxy' diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml new file mode 100644 index 0000000000..7e4da0d1b7 --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml @@ -0,0 +1,38 @@ + + + + +Tinyproxy +Tinyproxy ist ein schlanker HTTP(S)-Proxy ohne Zwischenspeicher +Proxyzugang erlauben von +Erlaube Header für anonymen Proxy +Ausgehendenden Verkehr an Adresse binden +Ports für CONNECT-Methode +0 = deaktiviert, leer = alle +Fehlerseite +Filterliste +Filter unterscheiden Groß-/Kleinschreibung +Filterliste ist eine Whitelist +Erweiterte reguläre Ausdrücke für Filter +Filtere URLs statt Domains +An Adresse binden +Protokolldatei +Protokolllevel +Maximale Anzahl an Clients +Maximale Anfragen pro Prozess +Max. Prozesszahl +Min. Prozesszahl +Anfängliche Prozesszahl +Statistikseite +In Systemprotokoll schreiben +Verbindungstimeout +Wert des Via-Headers +Client-IP übertragen +Über Proxy +Verbiete Zugriff +Zugangskontrolle +Zielhost +Methode +Zugangsproxy + + diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua new file mode 100644 index 0000000000..2520e38878 --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua @@ -0,0 +1,32 @@ +tinyproxy = 'Tinyproxy' +tinyproxy_desc = 'Tinyproxy is a small and fast non-caching HTTP(S)-Proxy' +tinyproxy_tinyproxy_allow = 'Allow access from' +tinyproxy_tinyproxy_anonymous = 'Allowed headers for anonymous proxy' +tinyproxy_tinyproxy_bind = 'Bind outgoing traffic to address' +tinyproxy_tinyproxy_connectport = 'Ports allowed for CONNECT method' +tinyproxy_tinyproxy_connectport_desc = '0 = disabled, empty = all' +tinyproxy_tinyproxy_defaulterrorfile = 'Error document' +tinyproxy_tinyproxy_filter = 'Filter list' +tinyproxy_tinyproxy_filtercasesensitive = 'Case sensitive filters' +tinyproxy_tinyproxy_filterdefaultdeny = 'Filter list is a whitelist' +tinyproxy_tinyproxy_filterextended = 'Extended regular expression filters' +tinyproxy_tinyproxy_filterurls = 'Filter URLs instead of domains' +tinyproxy_tinyproxy_listen = 'Listen on address' +tinyproxy_tinyproxy_logfile = 'Logfile' +tinyproxy_tinyproxy_loglevel = 'Log level' +tinyproxy_tinyproxy_maxclients = 'Maximum number of clients' +tinyproxy_tinyproxy_maxrequestsperchild = 'Maximum requests per thread' +tinyproxy_tinyproxy_maxspareservers = 'Max. spare servers' +tinyproxy_tinyproxy_minspareservers = 'Min. spare servers' +tinyproxy_tinyproxy_startservers = 'Spare servers to start with' +tinyproxy_tinyproxy_statfile = 'Statistic document' +tinyproxy_tinyproxy_syslog = 'Write to syslog' +tinyproxy_tinyproxy_timeout = 'Connection Timeout' +tinyproxy_tinyproxy_viaproxyname = 'Value of Via-Header' +tinyproxy_tinyproxy_xtinyproxy = 'Include client IP' +tinyproxy_type_proxy = 'Via proxy' +tinyproxy_type_reject = 'Reject access' +tinyproxy_upstream = 'Upstream Control' +tinyproxy_upstream_target = 'Target host' +tinyproxy_upstream_type = 'Type' +tinyproxy_upstream_via = 'Upstream Proxy' diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml new file mode 100644 index 0000000000..e97ca599b9 --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml @@ -0,0 +1,38 @@ + + + + +Tinyproxy +Tinyproxy is a small and fast non-caching HTTP(S)-Proxy +Allow access from +Allowed headers for anonymous proxy +Bind outgoing traffic to address +Ports allowed for CONNECT method +0 = disabled, empty = all +Error document +Filter list +Case sensitive filters +Filter list is a whitelist +Extended regular expression filters +Filter URLs instead of domains +Listen on address +Logfile +Log level +Maximum number of clients +Maximum requests per thread +Max. spare servers +Min. spare servers +Spare servers to start with +Statistic document +Write to syslog +Connection Timeout +Value of Via-Header +Include client IP +Via proxy +Reject access +Upstream Control +Target host +Type +Upstream Proxy + + diff --git a/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua new file mode 100644 index 0000000000..a18eb50da9 --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua @@ -0,0 +1,80 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- +m = Map("tinyproxy", translate("tinyproxy"), translate("tinyproxy_desc")) + +s = m:section(TypedSection, "tinyproxy", translate("general")) +s.anonymous = true + +s:option(Flag, "enable", translate("enable")) + +s:option(Value, "Port", translate("port")) +s:option(Value, "Listen").optional = true +s:option(Value, "Bind").optional = true +s:option(Value, "Timeout").optional = true + +s:option(Value, "DefaultErrorFile").optional = true +s:option(Value, "StatFile").optional = true + +s:option(Flag, "Syslog").optional = true +f = s:option(Value, "Logfile") +f.optional = true + +l = s:option(ListValue, "LogLevel") +l.optional = true +l:value("Critical") +l:value("Error") +l:value("Warning") +l:value("Notice") +l:value("Connect") +l:value("Info") + +s:option(DynamicList, "XTinyproxy").optional = true + +s:option(DynamicList, "Allow") +s:option(Value, "ViaProxyName") + +s:option(FileUpload, "Filter") +s:option(Flag, "FilterURLs") +s:option(Flag, "FilterExtended") +s:option(Flag, "FilterCaseSensitive") +s:option(Flag, "FilterDefaultDeny") + +s:option(DynamicList, "Anonymous") +s:option(DynamicList, "ConnectPort") + +s:option(Value, "User").optional = true +s:option(Value, "Group").optional = true +s:option(Value, "MaxClients").optional = true +s:option(Value, "MinSpareServers").optional = true +s:option(Value, "MaxSpareServers").optional = true +s:option(Value, "StartServers").optional = true +s:option(Value, "MaxRequestsPerChild").optional = true + + +s = m:section(TypedSection, "upstream") +s.anonymous = true +s.addremove = true + +t = s:option(ListValue, "type") +t:value("proxy", translate("tinyproxy_type_proxy")) +t:value("reject", translate("tinyproxy_type_reject")) + +ta = s:option(Value, "target") +ta.rmempty = true + +v = s:option(Value, "via") +v:depends({type="proxy"}) + +return m \ No newline at end of file diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 6655a05bb8..53734726f4 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -408,6 +408,16 @@ define Package/luci-app-hd_idle/install $(call Package/luci/install/template,$(1),applications/luci-hd_idle) endef +define Package/luci-app-tinyproxy + $(call Package/luci/webtemplate) + DEPENDS+=+luci-admin-full +tinyproxy + TITLE:=Tinyproxy - HTTP(S)-Proxy +endef + +define Package/luci-app-tinyproxy/install + $(call Package/luci/install/template,$(1),applications/luci-tinyproxy) +endef + ### Server Gateway Interfaces ### @@ -564,6 +574,9 @@ endif ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),) PKG_SELECTED_MODULES+=applications/luci-hd_idle endif +ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),) + PKG_SELECTED_MODULES+=applications/luci-tinyproxy +endif ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),) @@ -628,6 +641,7 @@ $(eval $(call BuildPackage,luci-app-uvc_streamer)) $(eval $(call BuildPackage,luci-app-p910nd)) $(eval $(call BuildPackage,luci-app-ushare)) $(eval $(call BuildPackage,luci-app-hd_idle)) +$(eval $(call BuildPackage,luci-app-tinyproxy)) $(eval $(call BuildPackage,luci-sgi-cgi)) diff --git a/libs/uci/root/etc/config/ucitrack b/libs/uci/root/etc/config/ucitrack index 0349f81c8e..8b647fda8d 100644 --- a/libs/uci/root/etc/config/ucitrack +++ b/libs/uci/root/etc/config/ucitrack @@ -50,3 +50,6 @@ config ntpclient config samba option init samba + +config tinyproxy + option init tinyproxy