>>>>> "Reiner" == Reiner Buehl <[EMAIL PROTECTED]> writes:

>> How to make simple http proxy with Perl ?
>> I just want to dump requests in 2 files - in_file and out_file.

Reiner> This is what I use. It is from a older issue of the german "Linux
Reiner> Magazin", http://www.linux-magazin.de/ausgabe/2000/04/Proxy/proxy.html
Reiner> I have used it on both, linux and windows NT/2000.

Also see <http://www.stonehenge.com/merlyn/WebTechniques/col34.html>,
a pre-forking (apache-style) compressing proxy server, and
<http://www.stonehenge.com/merlyn/WebTechniques/col11.html>, the older
version of same.

On my disk (and soon to be a column), I have a pre-forking, load
adapting (MinSpareIdle and MaxSpareIdle, anyone?) proxy server that
properly handles HTTPS transparent passthrough (via CONNECT) and
streams the results, *and* puts an HTML::Parser in streaming mode
inline with any text/html response, so that you can rewrite the HTML
on the fly by simply recognizing the events in your handcrafted state
machine, and recognizes local URLs to serve them if needed.  It
benchmarks at *half* the speed of Apache, even doing everything it's
doing in Pure Perl, and is under 500 lines of code.

Coming soon to a magazine near you. :-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to