Proxy in perl

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Thanks Tim and Martein for your reponses on this.  Here is what I am
doing to setup a simple proxy on my box localy using HTTP::Proxy module.

use HTTP::Proxy;

my $proxy=HTTP::Proxy->new (port => 3128);


Just these 4 lines starts up the proxy server on my local machine
listening on port 3128 and then I point my browser's proxy setting to
"localhost" and port "3128".  This all works great.  No issues there.

However, I would like to see the URL that the user just typed in the
broswer and then take the URL and see if another upstream server app
thinks its blocked or not (a central server) and if the central server
returns a block then spit that out to the users browser. How can I
intercept the user request? and see what that request was in the code above.

Thanks a bunch guys.  Really appreciate it.

Re: Proxy in perl

Quoted text here. Click to load it

You need to use the ->push_filter method on the proxy object before you
call ->start. See the documentation for HTTP::Proxy.


You poor take courage, you rich take care:
The Earth was made a common treasury for everyone to share
All things in common, all people one.
'We come in peace'---the order came to cut them down.       []

Re: Proxy in perl

Ben Morrow wrote:
Quoted text here. Click to load it

Thanks Ben.  I will give it a shot.

Site Timeline