aboutsummaryrefslogtreecommitdiff
path: root/www/ziproxy/files
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-08-01 01:20:33 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-08-01 01:20:33 +0000
commit64a9bb8abd4791524fa60ba5cf2c90f59af5d1c4 (patch)
treed76c266afea13353688d7c0d766042d73c6bf21d /www/ziproxy/files
parent5cf40cd4f51a05212a7c8252987161c1250a315a (diff)
Notes
Diffstat (limited to 'www/ziproxy/files')
-rw-r--r--www/ziproxy/files/patch-ziproxy.conf39
-rw-r--r--www/ziproxy/files/pkg-message.in16
-rw-r--r--www/ziproxy/files/ziproxy.in30
3 files changed, 85 insertions, 0 deletions
diff --git a/www/ziproxy/files/patch-ziproxy.conf b/www/ziproxy/files/patch-ziproxy.conf
new file mode 100644
index 000000000000..b6bfeb94631d
--- /dev/null
+++ b/www/ziproxy/files/patch-ziproxy.conf
@@ -0,0 +1,39 @@
+--- etc/ziproxy.conf.orig Wed Jul 26 09:01:36 2006
++++ etc/ziproxy.conf Mon Jul 31 01:07:02 2006
+@@ -9,7 +9,7 @@
+
+ ## WARNING: Remember to restrict the access to Ziproxy
+ ## if your machine is directly connected to the Internet.
+-# OnlyFrom = "127.0.0.1"
++OnlyFrom = "localhost"
+
+ # Inactivity timeout before closing the daemon (0 = no timeout)
+ NetdTimeout = 0
+@@ -36,7 +36,7 @@
+ ## HTTP auth file
+ ## Should contain user:pass pairs, lines no longer than 128 chars
+ ## Password is unencrypted
+-# PasswdFile="/usr/local/ziproxy/ziproxy.passwd"
++# PasswdFile="/usr/local/etc/ziproxy.passwd"
+
+ ## Forward everything to another proxy server.
+ ## Modifications/compression is still applied.
+@@ -151,13 +151,12 @@
+ ## Note: The internal defaults give more precise error messages.
+ ##
+ ## 400 - Bad request (malformed URL, or unknown URL type)
+-# CustomError400="/var/ziproxy/error/400.html"
++# CustomError400="%%DATADIR%%/error/400.html"
+ ## 404 - Unknown host (Ziproxy will not issue 'page not found' errors itself)
+-# CustomError404="/var/ziproxy/error/404.html"
++# CustomError404="%%DATADIR%%/error/404.html"
+ ## 408 - Request timed out
+-# CustomError408="/var/ziproxy/error/408.html"
++# CustomError408="%%DATADIR%%/error/408.html"
+ ## 500 - Internal error (or empty response from server)
+-# CustomError500="/var/ziproxy/error/500.html"
++# CustomError500="%%DATADIR%%/error/500.html"
+ ## 503 - Connection refused (or service unavailable)
+-# CustomError503="/var/ziproxy/error/503.html"
+-
++# CustomError503="%%DATADIR%%/error/503.html"
diff --git a/www/ziproxy/files/pkg-message.in b/www/ziproxy/files/pkg-message.in
new file mode 100644
index 000000000000..df672e2013ea
--- /dev/null
+++ b/www/ziproxy/files/pkg-message.in
@@ -0,0 +1,16 @@
+By default, to prevent creating non-controllable public proxies, ziproxy is
+configured to accept connections only on localhost.
+You have to edit %%PREFIX%%/etc/ziproxy.conf
+to enable remote access to service.
+
+There is no man page for ziproxy, but info can be found in
+%%DOCSDIR%%/README.
+
+ziproxy can be started by the following ways:
+o daemon mode:
+ * add ziproxy_enable="YES" to your /etc/rc.conf
+ * use rc(8) script %%PREFIX%%/etc/rc.d/ziproxy.sh
+o inetd mode:
+ * add ``http-proxy 8080/tcp #HTTP Proxy'' to /etc/services
+ * add ``http-proxy stream tcp nowait nobody /usr/local/bin/ziproxy ziproxy -i'' to your /etc/inetd.conf
+ * reload inetd(8) config files by doing `/etc/rc.d/inetd reload`
diff --git a/www/ziproxy/files/ziproxy.in b/www/ziproxy/files/ziproxy.in
new file mode 100644
index 000000000000..0ff86a4a3fba
--- /dev/null
+++ b/www/ziproxy/files/ziproxy.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: ziproxy
+# REQUIRE: DAEMON
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# ziproxy_enable (bool): Set to NO by default.
+# Set it to YES to enable ziproxy.
+# ziproxy_config (path): Set to %%PREFIX%%/etc/ziproxy.conf
+# by default.
+#
+
+. "%%RC_SUBR%%"
+
+name="ziproxy"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/bin/${name}
+pidfile=/var/run/${name}.pid
+
+load_rc_config $name
+
+: ${ziproxy_enable="NO"}
+: ${ziproxy_config="%%PREFIX%%/etc/ziproxy.conf"}
+
+command_args="-d -c ${ziproxy_config}"
+
+run_rc_command "$1"