WWW proxies?
Dan McGuirk
mcguirk at indirect.com
Mon May 6 02:33:08 PDT 1996
On Sun, 5 May 1996, Lucky Green wrote:
> At 0:30 5/5/96, Lou Poppler wrote:
> >On Fri, 26 Apr 1996 19:13:06 -0400 (EDT),
> >Black Unicorn <unicorn at schloss.li> wrote:
> >}
> >} Has anyone developed such a beast yet?
Here's a simple one in 3 lines of perl. It only supports HTTP GET, and
it ignores all of the MIME headers on the original request. It requires the
LWP perl module, but the RSA code requires dc, so I guess it's fair :)
#!/usr/bin/perl5 --# HTTP proxy, GET/http only; usage: 'lwp-proxy <port>'
use LWP::Simple;sub w{wait;}$SIG{'CHLD'}='w';$SIG{'CLD'}='w';socket(S,2,1,6);
bind(S,pack(Sna4x8,2,$ARGV[0]));listen(S,5);while(1){accept(N,S);if(!fork){
open(STDERR,">&N");chop($r=<N>);$r=~s/^GET //i;select(N);getprint($r);exit;}}
More information about the cypherpunks-legacy
mailing list