CGI-based Proxy

Maurice Aubrey (maurice@hevanet.com)
Wed, 05 Aug 1998 03:14:51 -0700


I've developed a small CGI program which acts as an anonymizing proxy.
It is very similar to the service offered at
http://www.anonymizer.com/, except the source is included :-)

The script accepts a URL, which it then retrieves, modifies, and
returns to the user.  All links in the page are modified
on-the-fly to point back to the proxy script (instead of the
true server).  This provides anonymous surfing without the
need of running a dedicated proxy (all that's required is
libwww-perl and the ability to execute CGI programs).

The script isn't perfect yet.  It does not remove java
or javascript, does not handle authentication, and does not
parse meta tags.  It also doesn't include any form of
access control.

It does, however, support "anonymous cookies".  Cookies are
stored on the server, and are never returned to the user.
This allows you to use cookies, even if you do not have a cookie
compatible browser, or have cookies turned off.

I intend to add the ability to chain requests, and to control
certain functions (like whether you want to use anonymous cookies).

You can try it out at:

	http://olympia2.adhost.com:8080/~maurice/proxy/nph-proxy.mp

Just append the URL you wish to retrieve as path info.  For example,

	http://olympia2.adhost.com:8080/~maurice/proxy/nph-proxy.mp/http://www.yahoo.c
om/

will retrieve Yahoo's page.

The source is available at:

	http://olympia2.adhost.com/~maurice/nph-proxy.gz

You must configure your server not to send headers with the script.  In the 
case of
Apache, just add an nph- prefix to the filename.
The script runs under mod_perl's Apache::Registry if you turn PerlSendHeaders 
off.

If you have ideas for other useful features, please let me know.


-- 
Maurice Aubrey <maurice@hevanet.com>

Progress is made by lazy men looking for easier ways to do things. 
  - Robert Heinlein