summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/CONFIG11
-rw-r--r--doc/HTTP_ERROR_CODES61
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in216
-rw-r--r--doc/RFC_INFO23
-rw-r--r--doc/TODO27
-rwxr-xr-xdoc/report.sh14
-rw-r--r--doc/tinyproxy.8121
8 files changed, 475 insertions, 0 deletions
diff --git a/doc/CONFIG b/doc/CONFIG
new file mode 100644
index 0000000..910bc36
--- /dev/null
+++ b/doc/CONFIG
@@ -0,0 +1,11 @@
+ListenPort port number
+ListenAddress IP Address
+User user name
+LogFile name of log file (location as well)
+LoadLimit load limit
+StatHost URL of stat host
+AllowSubnet n.n.n.n/n ... (or n.n.n.* or *.domain.com)
+AllowHeader header ... (or head*)
+SendXTinyproxy yes/no
+
+* rewrite URL request (i.e. www.virtual1.com to www.domain.com/virtual1)
diff --git a/doc/HTTP_ERROR_CODES b/doc/HTTP_ERROR_CODES
new file mode 100644
index 0000000..b7fb0cd
--- /dev/null
+++ b/doc/HTTP_ERROR_CODES
@@ -0,0 +1,61 @@
+The following is a list of the response codes for the various states of
+the server. Currently I would recommend we stick to the HTTP/1.0 return
+codes for our errors. Once we start to support the distinction between
+HTTP/1.0 and HTTP/1.1 requests from the client, then we can use the
+HTTP/1.1 responses.
+ -- rjkaes
+
+[ Taken from Apache: The Definitive Guide by Ben Laurie & Peter Laurie.
+ Published by O'Reilly & Associates, Inc. pg. 146-147 ]
+
+HTTP/1.0
+200 OK
+302 Found
+304 Not Modified
+400 Bad Request
+401 Unauthorized
+403 Forbidden
+404 Not Found
+500 Server error
+501 Not Implemented
+502 Bad Gateway
+503 Out of resources
+
+HTTP/1.1
+100 Continue
+101 Switching Protocols
+200 Ok
+201 Created
+202 Accepted
+203 Non-Authoritative Information
+204 No Content
+205 Reset Content
+206 Partial Content
+300 Multiple Choices
+301 Moved Permanently
+302 Moved Temporarily
+303 See Other
+304 Not Modified
+305 Use Proxy
+400 Bad Request
+401 Unauthorized
+402 Payment Required
+403 Forbidden
+404 Not Found
+405 Method Not Allowed
+406 Not Acceptable
+407 Proxy Authentication Required
+408 Request Time-out
+409 Conflict
+410 Gone
+411 Length Required
+412 Precondition Failed
+413 Request Entity Too Large
+414 Request-URI Too Large
+415 Unsupported Media Type
+500 Internal Server Error
+501 Not Implemented
+502 Bad Gateway
+503 Service Unavailable
+504 Gateway Time-out
+505 HTTP Version not supported
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..bc3c786
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = tinyproxy.8 CONFIG HTTP_ERROR_CODES RFC_INFO TODO report.sh
+man_MANS = tinyproxy.8
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..6119e98
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,216 @@
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+EXTRA_DIST = tinyproxy.8 CONFIG HTTP_ERROR_CODES RFC_INFO TODO report.sh
+man_MANS = tinyproxy.8
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../src/defines.h
+CONFIG_CLEAN_FILES =
+man8dir = $(mandir)/man8
+MANS = $(man_MANS)
+
+NROFF = nroff
+DIST_COMMON = Makefile.am Makefile.in TODO
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-man8:
+ $(mkinstalldirs) $(DESTDIR)$(man8dir)
+ @list='$(man8_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
+ done
+
+uninstall-man8:
+ @list='$(man8_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man8dir)/$$inst; \
+ done
+install-man: $(MANS)
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-man8
+uninstall-man:
+ @$(NORMAL_UNINSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man8
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-man
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-man
+uninstall: uninstall-am
+all-am: Makefile $(MANS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: install-man8 uninstall-man8 install-man uninstall-man tags \
+distdir info-am info dvi-am dvi check check-am installcheck-am \
+installcheck install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/RFC_INFO b/doc/RFC_INFO
new file mode 100644
index 0000000..081d2d0
--- /dev/null
+++ b/doc/RFC_INFO
@@ -0,0 +1,23 @@
+INFO
+----
+The following files were/are useful for the proper coding of
+tinyproxy. Please note: someday tinyproxy will actually be RFC
+compliant, but today is not that day. Right now tinyproxy is pretty
+close to being HTTP/1.0 compliant, but there are probably a few
+incompatibilities kicking around.
+
+RFCs
+----
+1945 Hypertext Transfer Protocol -- HTTP/1.0
+2396 Uniform Resource Identifiers (URI): Generic Syntax
+2616 Hypertext Transfer Protocol -- HTTP/1.1
+2617 HTTP Authentication: Basic and Digest Access Authentication
+
+POSSIBLE LOCATION
+-----------------
+There are many places to obtain a copy of the RFCs, but I use
+
+ http://www.rfc-editor.org/
+
+since it provides a great search feature for finding all the RFCs for
+a particular topic.
diff --git a/doc/TODO b/doc/TODO
new file mode 100644
index 0000000..257a1d3
--- /dev/null
+++ b/doc/TODO
@@ -0,0 +1,27 @@
+The following are some features that I'd like to add to tinyproxy in the
+future. Where possible, I've listed the person who suggested it. This
+list is in no particular order. And hey, if you want to implement one of
+these, or another idea you have, go right ahead. Just mail me the diff
+against the current tree and I'll integrate it if possible.
+
+ - Include hooks so other types of proxies can be modularly added to
+ the source tree. Then people can simply choose which types of
+ proxies (ftp, www, etc) they'd like enabled in tinyproxy.h
+ Suggested: Tarun Tuli.
+ - Make the source tree autoconf-ed so people can avoid editing
+ tinyproxy.h and the like.
+ - Add some kind of access control mechanism - probably IP-based,
+ so users can choose only to let people from certain networks/ISP
+ use the proxy. This becomes more of an issue with FTP proxies
+ and the like. (Partially Done. It would be better if there was a
+ config file.)
+ - Find a more elegant solution to embedding HTML documents in the
+ source than the current method. (see httperr() and showstats() for
+ examples of how it's done right now).
+ - Include a function to rewrite the incoming requests. Should not be
+ much of a problem. Just need to modify the clientreq code to look up
+ the URL and rewrite it. If we want to go really fancy with RegEx
+ mapping this could get ugly. :)
+ - Ed Avis suggests having tinyproxy have the ability to send the data
+ from the connections through an external filtering program. I kind of
+ like this idea, but I don't really have a good way of doing it yet.
diff --git a/doc/report.sh b/doc/report.sh
new file mode 100755
index 0000000..2e6b4ee
--- /dev/null
+++ b/doc/report.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+(echo "date: "
+date
+echo "uname: "
+uname -a
+echo "ps: "
+ps -auxw | grep [t]inyproxy -
+echo "ver: "
+if [ -x /usr/local/bin/tinyproxy ]; then
+ /usr/local/bin/tinyproxy -v
+else
+ echo no ver available.
+fi;) 2>&1 | mail -s 'tinyproxy install report' sdyoung@well.com
diff --git a/doc/tinyproxy.8 b/doc/tinyproxy.8
new file mode 100644
index 0000000..bcf11d4
--- /dev/null
+++ b/doc/tinyproxy.8
@@ -0,0 +1,121 @@
+.\" -*- nroff -*-
+.\"
+.\" tinyproxy.1
+.\"
+.\" Copyright (c) 1999, Robert James Kaes, Steven Young.
+.\"
+.\" This program is distributed under the terms of the GNU General Public
+.\" License. See COPYING for additional information.
+.\"
+.TH tinyproxy 1 "December 23, 1999" "tinyproxy" "tinyproxy Manual"
+.SH NAME
+tinyproxy \- a small HTTP proxy server
+.SH SYNOPSIS
+tinyproxy [options]
+.SH DESCRIPTION
+.B tinyproxy
+is an HTTP proxy server designed to consume a minimum of system resources.
+It listens on a given TCP port and handles HTTP proxy requests.
+.SH OPTIONS
+.TP 5
+.B \-v
+Display version information and exit.
+.TP 5
+.B \-h
+Display a short help screen of command line arguments and exit.
+.TP 5
+.B \-d
+Don't daemonize; stay in the foreground.
+.TP 5
+.B "\-n ip_address"
+Allow access from only those hosts in the subnet.
+.I ip_address
+should be of a form xxx.xxx.xxx. like 192.168.0.
+.TP 5
+.BI "\-i ip_address"
+Only listen to the specific address. Useful for systems with more than one
+network connection.
+.I ip_address
+needs to be in the dotted-decimal form (e.g. 192.168.0.1)
+.TP 5
+.BI "\-p port"
+Listen to
+.I port
+instead of the default as defined in config.h.
+.TP 5
+.BI "\-l logfile"
+Log to the file
+.I logfile
+instead of the default as defined in config.h.
+.TP 5
+.BI \-r
+Restrict the log file to only logging error conditions. The hosts connecting
+and the locations being accessed are not logged.
+.TP 5
+.B \-S
+Log to the syslog daemon
+.TP 5
+.BI "\-a headername"
+Allow the header
+.I headername
+through to the server (anon mode only). It is highly recommended that you
+specify -a Host: and -a Authorization:, otherwise HTTP/1.1 virtual domains
+and basic authentication will fail. If anon mode is compiled into the
+program, but you do not provide a
+.I headername
+tinyproxy will run as if anon mode was not compiled in.
+.TP 5
+.BI "\-w loadaverage"
+Stop handling requests when the load is
+.I loadaverage
+or higher. Specifying a
+.I loadaverage
+of 0.00 will disable this feature.
+(disabled by default)
+.TP 5
+.BI "\-u username"
+Begin running as
+.I username
+after the port has been bound and the logfile has been opened. Only
+works if tinyproxy is being run as root. "" to disable.
+.SH SIGNALS
+In addition to these command line options, there are also several signals
+that can be sent to tinyproxy while it is running to generate debugging
+information and to force certain events.
+.TP 5
+.B SIGUSR1
+Dump a summary of all current connections to the logfile.
+.TP 5
+.B SIGHUP
+Force
+.B tinyproxy
+to do a garbage collection on the current connections linked list. This
+is usually done automatically after a certain number of connections have
+been handled.
+.SH FILES
+.SM /var/log/tinyproxy.log
+.SH AUTHORS
+Steven Young (sdyoung@well.com)
+.PP
+Robert James Kaes (rjkaes@flarenet.com)
+.SH BUGS
+For some reason, when sent SIGTERM,
+.B tinyproxy
+occasionally waits for the
+next incoming connection before exiting. We believe this bug has
+been corrected, but please e-mail the authors if you see this
+behaviour occurring.
+.SH COPYRIGHT
+.B tinyproxy
+is distributed under the GNU Public License (GPL). For more information
+on the GPL, please see the file COPYING which should have been included in
+the archive with tinyproxy. Failing that, http://www.fsf.org/ will
+doubtless have a copy up for you to peruse. Please don't use this
+software if you don't agree to the terms specified therein.
+.SH AVAILABILITY
+The latest version of
+.B tinyproxy
+can be acquired from:
+.PP
+http://www.flarenet.com/tinyproxy/
+http://tinyproxy.attacca.com/