Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Proxy in perl
October 2, 2008, 10:00 pm
rate this thread
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.
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
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. [email@example.com]
- » FAQ 3.29 When I tried to run my script, I got this message. What does it mean?
- — Previous thread in » PERL Discussions