From bf61a13e30e21f1a5355e9f5464670b628438cfc Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 2 Oct 2008 17:15:49 +0000 Subject: Added tinyproxy application --- applications/luci-tinyproxy/Makefile | 2 + .../luci-tinyproxy/luasrc/controller/tinyproxy.lua | 25 +++++++ .../luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua | 32 +++++++++ .../luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml | 38 ++++++++++ .../luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua | 32 +++++++++ .../luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml | 38 ++++++++++ .../luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua | 81 ++++++++++++++++++++++ contrib/package/luci/Makefile | 14 ++++ 8 files changed, 262 insertions(+) create mode 100644 applications/luci-tinyproxy/Makefile create mode 100644 applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua create mode 100644 applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua create mode 100644 applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml create mode 100644 applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua create mode 100644 applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml create mode 100644 applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua diff --git a/applications/luci-tinyproxy/Makefile b/applications/luci-tinyproxy/Makefile new file mode 100644 index 000000000..81a96f6a8 --- /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 000000000..2ecfb9383 --- /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 000000000..32fb45239 --- /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_listen = "An Adresse binden" +tinyproxy_tinyproxy_bind = "Ausgehendenden Verkehr an Adresse binden" +tinyproxy_tinyproxy_timeout = "Verbindungstimeout" +tinyproxy_tinyproxy_defaulterrorfile = "Fehlerseite" +tinyproxy_tinyproxy_statfile = "Statistikseite" +tinyproxy_tinyproxy_logfile = "Protokolldatei" +tinyproxy_tinyproxy_syslog = "In Systemprotokoll schreiben" +tinyproxy_tinyproxy_loglevel = "Protokolllevel" +tinyproxy_tinyproxy_xtinyproxy = "Client-IP übertragen" +tinyproxy_tinyproxy_maxclients = "Maximale Anzahl an Clients" +tinyproxy_tinyproxy_minspareservers = "Min. Prozesszahl" +tinyproxy_tinyproxy_maxspareservers = "Max. Prozesszahl" +tinyproxy_tinyproxy_startservers = "Anfängliche Prozesszahl" +tinyproxy_tinyproxy_maxrequestsperchild = "Maximale Anfragen pro Prozess" +tinyproxy_tinyproxy_allow = "Proxyzugang erlauben von" +tinyproxy_tinyproxy_viaproxyname = "Wert des Via-Headers" +tinyproxy_tinyproxy_filter = "Filterliste" +tinyproxy_tinyproxy_filterurls = "Filtere URLs statt Domains" +tinyproxy_tinyproxy_filterextended = "Erweiterte reguläre Ausdrücke für Filter" +tinyproxy_tinyproxy_filtercasesensitive = "Filter unterscheiden Groß-/Kleinschreibung" +tinyproxy_tinyproxy_filterdefaultdeny = "Filterliste ist eine Whitelist" +tinyproxy_tinyproxy_anonymous = "Erlaube Header für anonymen Proxy" +tinyproxy_tinyproxy_connectport = "Ports für CONNECT-Methode" +tinyproxy_tinyproxy_connectport_desc = "0 = deaktiviert, leer = alle" +tinyproxy_upstream = "Zugangskontrolle" +tinyproxy_upstream_type = "Methode" +tinyproxy_type_proxy = "Über Proxy" +tinyproxy_type_reject = "Verbiete Zugriff" +tinyproxy_upstream_via = "Zugangsproxy" +tinyproxy_upstream_target = "Zielhost" \ No newline at end of file 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 000000000..7e4da0d1b --- /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 000000000..2c96d6130 --- /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_listen = "Listen on address" +tinyproxy_tinyproxy_bind = "Bind outgoing traffic to address" +tinyproxy_tinyproxy_timeout = "Connection Timeout" +tinyproxy_tinyproxy_defaulterrorfile = "Error document" +tinyproxy_tinyproxy_statfile = "Statistic document" +tinyproxy_tinyproxy_logfile = "Logfile" +tinyproxy_tinyproxy_syslog = "Write to syslog" +tinyproxy_tinyproxy_loglevel = "Log level" +tinyproxy_tinyproxy_xtinyproxy = "Include client IP" +tinyproxy_tinyproxy_maxclients = "Maximum number of clients" +tinyproxy_tinyproxy_minspareservers = "Min. spare servers" +tinyproxy_tinyproxy_maxspareservers = "Max. spare servers" +tinyproxy_tinyproxy_startservers = "Spare servers to start with" +tinyproxy_tinyproxy_maxrequestsperchild = "Maximum requests per thread" +tinyproxy_tinyproxy_allow = "Allow access from" +tinyproxy_tinyproxy_viaproxyname = "Value of Via-Header" +tinyproxy_tinyproxy_filter = "Filter list" +tinyproxy_tinyproxy_filterurls = "Filter URLs instead of domains" +tinyproxy_tinyproxy_filterextended = "Extended regular expression filters" +tinyproxy_tinyproxy_filtercasesensitive = "Case sensitive filters" +tinyproxy_tinyproxy_filterdefaultdeny = "Filter list is a whitelist" +tinyproxy_tinyproxy_anonymous = "Allowed headers for anonymous proxy" +tinyproxy_tinyproxy_connectport = "Ports allowed for CONNECT method" +tinyproxy_tinyproxy_connectport_desc = "0 = disabled, empty = all" +tinyproxy_upstream = "Upstream Control" +tinyproxy_upstream_type = "Type" +tinyproxy_type_proxy = "Via proxy" +tinyproxy_type_reject = "Reject access" +tinyproxy_upstream_via = "Upstream Proxy" +tinyproxy_upstream_target = "Target host" \ No newline at end of file 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 000000000..e97ca599b --- /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 000000000..b1afb3f7e --- /dev/null +++ b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua @@ -0,0 +1,81 @@ +--[[ +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 +f:depends({Syslog = ""}) + +l = s:option(ListValue, "LogLevel") +l.optional = true +l:value("Critical") +l:value("Error") +l:value("Warning") +l:value("Notice") +l:value("Connect") +l:value("Info") + +s:option(DynamicList, "XTinyproxy").optional = true + +s:option(DynamicList, "Allow") +s:option(Value, "ViaProxyName") + +s:option(FileUpload, "Filter") +s:option(Flag, "FilterURLs") +s:option(Flag, "FilterExtended") +s:option(Flag, "FilterCaseSensitive") +s:option(Flag, "FilterDefaultDeny") + +s:option(DynamicList, "Anonymous") +s:option(DynamicList, "ConnectPort") + +s:option(Value, "User").optional = true +s:option(Value, "Group").optional = true +s:option(Value, "MaxClients").optional = true +s:option(Value, "MinSpareServers").optional = true +s:option(Value, "MaxSpareServers").optional = true +s:option(Value, "StartServers").optional = true +s:option(Value, "MaxRequestsPerChild").optional = true + + +s = m:section(TypedSection, "upstream") +s.anonymous = true +s.addremove = true + +t = s:option(ListValue, "type") +t:value("proxy", translate("tinyproxy_type_proxy")) +t:value("reject", translate("tinyproxy_type_reject")) + +ta = s:option(Value, "target") +ta.rmempty = true + +v = s:option(Value, "via") +v:depends({type="proxy"}) + +return m \ No newline at end of file diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 06bc35de1..6c828964d 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -494,6 +494,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 ### @@ -726,6 +736,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),) @@ -815,6 +828,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)) $(eval $(call BuildPackage,luci-sgi-luci)) -- cgit v1.2.3