summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-02 17:15:49 +0000
committerSteven Barth <steven@midlink.org>2008-10-02 17:15:49 +0000
commitbf61a13e30e21f1a5355e9f5464670b628438cfc (patch)
tree577456502f31bb5ffc3f7ffa44150c9db0938017
parentb0cbce0da2cb869ad80a365635bfca3b50f8cc9f (diff)
Added tinyproxy application
-rw-r--r--applications/luci-tinyproxy/Makefile2
-rw-r--r--applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua25
-rw-r--r--applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.lua32
-rw-r--r--applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml38
-rw-r--r--applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.lua32
-rw-r--r--applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml38
-rw-r--r--applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua81
-rw-r--r--contrib/package/luci/Makefile14
8 files changed, 262 insertions, 0 deletions
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 <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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..32fb45239d
--- /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 0000000000..7e4da0d1b7
--- /dev/null
+++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.de.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
+
+<i18n:msg xml:id="tinyproxy">Tinyproxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_desc">Tinyproxy ist ein schlanker HTTP(S)-Proxy ohne Zwischenspeicher</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_allow">Proxyzugang erlauben von</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_anonymous">Erlaube Header für anonymen Proxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_bind">Ausgehendenden Verkehr an Adresse binden</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_connectport">Ports für CONNECT-Methode</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_connectport_desc">0 = deaktiviert, leer = alle</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_defaulterrorfile">Fehlerseite</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filter">Filterliste</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filtercasesensitive">Filter unterscheiden Groß-/Kleinschreibung</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterdefaultdeny">Filterliste ist eine Whitelist</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterextended">Erweiterte reguläre Ausdrücke für Filter</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterurls">Filtere URLs statt Domains</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_listen">An Adresse binden</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_logfile">Protokolldatei</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_loglevel">Protokolllevel</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxclients">Maximale Anzahl an Clients</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxrequestsperchild">Maximale Anfragen pro Prozess</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxspareservers">Max. Prozesszahl</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_minspareservers">Min. Prozesszahl</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_startservers">Anfängliche Prozesszahl</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_statfile">Statistikseite</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_syslog">In Systemprotokoll schreiben</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_timeout">Verbindungstimeout</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_viaproxyname">Wert des Via-Headers</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_xtinyproxy">Client-IP übertragen</i18n:msg>
+<i18n:msg xml:id="tinyproxy_type_proxy">Über Proxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_type_reject">Verbiete Zugriff</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream">Zugangskontrolle</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_target">Zielhost</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_type">Methode</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_via">Zugangsproxy</i18n:msg>
+
+</i18n:msgs>
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..2c96d61303
--- /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 0000000000..e97ca599b9
--- /dev/null
+++ b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.en.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
+
+<i18n:msg xml:id="tinyproxy">Tinyproxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_desc">Tinyproxy is a small and fast non-caching HTTP(S)-Proxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_allow">Allow access from</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_anonymous">Allowed headers for anonymous proxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_bind">Bind outgoing traffic to address</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_connectport">Ports allowed for CONNECT method</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_connectport_desc">0 = disabled, empty = all</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_defaulterrorfile">Error document</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filter">Filter list</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filtercasesensitive">Case sensitive filters</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterdefaultdeny">Filter list is a whitelist</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterextended">Extended regular expression filters</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_filterurls">Filter URLs instead of domains</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_listen">Listen on address</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_logfile">Logfile</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_loglevel">Log level</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxclients">Maximum number of clients</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxrequestsperchild">Maximum requests per thread</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_maxspareservers">Max. spare servers</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_minspareservers">Min. spare servers</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_startservers">Spare servers to start with</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_statfile">Statistic document</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_syslog">Write to syslog</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_timeout">Connection Timeout</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_viaproxyname">Value of Via-Header</i18n:msg>
+<i18n:msg xml:id="tinyproxy_tinyproxy_xtinyproxy">Include client IP</i18n:msg>
+<i18n:msg xml:id="tinyproxy_type_proxy">Via proxy</i18n:msg>
+<i18n:msg xml:id="tinyproxy_type_reject">Reject access</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream">Upstream Control</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_target">Target host</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_type">Type</i18n:msg>
+<i18n:msg xml:id="tinyproxy_upstream_via">Upstream Proxy</i18n:msg>
+
+</i18n:msgs>
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..b1afb3f7ea
--- /dev/null
+++ b/applications/luci-tinyproxy/luasrc/model/cbi/tinyproxy.lua
@@ -0,0 +1,81 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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 06bc35de1f..6c828964d5 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))