06-13-2012
proxy server using perl
I want to write a perl script on a server to behave like a proxy server.
I want to be able to enter the hostname and port on firefox proxy settings (or IE, chrome, whatever) and then go to a site, and have my webserver forward the request to another server, and forward the response back to the client. Is there a perl script/PM that can do this?
I dont want to use HTTP::Proxy, since i'm facing problem in installing it. Also ppm doesnt have HTTP::Proxy listed.
10 More Discussions You Might Find Interesting
1. IP Networking
I'm new to this forum, so please be gentle !
I need to get my IBM RS running AIX4.3 onto the internet to a particular ftp server, through a NT server running proxy services.
This NT server is directly connected to our internet router vis a secondary NIC on the NT server.
When I add the route... (2 Replies)
Discussion started by: garry
2 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to get a Unix server on the internet (mostly for DNS requests) but this server is on a network behind a Proxy server. How can I configure my unix server that he will pass the proxy server for internet requests? (2 Replies)
Discussion started by: RSlegers
2 Replies
3. Linux
i have installed a proxy server on my linux box .
how to get the IP for that proxy .
cheers (3 Replies)
Discussion started by: ppass
3 Replies
4. IP Networking
I have a VPN client on a computer. Unfortunately, I am not, as a matter of my client's security policy, allowed to install that VPN client on additional computers in my home office.
This is inconvient. I would like to use remote desktop from additional computers in my home office. Can someone... (4 Replies)
Discussion started by: siegfried
4 Replies
5. Shell Programming and Scripting
I have been toying with a Proxy client/server app that will listen on the CLIENT system on lets say port 7070. User's browser proxy setting is configured for "localhost" port "7070".
When this proxy app gets a request for a URL it should FETCH the URL and display it on the browser.
I... (1 Reply)
Discussion started by: Dabheeruz
1 Replies
6. Red Hat
Hi,
I want to be able to get my server to update via yum through our work proxy.
I have tried the usual method of exporting the http_proxy=http://username:password@domain.com but this does not work for me.
I opce heard about a guy who set up a proxy on his XP laptop (Don't flame me I have... (0 Replies)
Discussion started by: pobman
0 Replies
7. IP Networking
Hi,
I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies
8. Cybersecurity
I may be doing this incorrectly, so if you have any suggestions, I'm open to it. So I installed a reverse proxy server on my LAN. It's not on the DMZ because it's coming from a blade running inside a virtual machine. Anyways, so I installed iptables and locked everything down from the outside... (1 Reply)
Discussion started by: sdotsen
1 Replies
9. Red Hat
Hi all,
First of all i would like to say sorry to all for my english.
My name is Mastan. We have an proxy server have 2 lan cards. one is for public and another for private.
public ip: 182.72.141....
private ip: 192.168.0.0
So, the thing is i configure ftp server in my local for... (0 Replies)
Discussion started by: mastansaheb
0 Replies
10. UNIX for Dummies Questions & Answers
Hi,
i would like to enable all operations/connections to use a proxy server in a redhat server ,
witch file should i config to get this for all conections ....
Thanks (0 Replies)
Discussion started by: prpkrk
0 Replies
LEARN ABOUT DEBIAN
http::proxy::bodyfilter::complete
HTTP::Proxy::BodyFilter::complete(3pm) User Contributed Perl Documentation HTTP::Proxy::BodyFilter::complete(3pm)
NAME
HTTP::Proxy::BodyFilter::complete - A filter that passes on a complete body or nothing
SYNOPSIS
use HTTP::Proxy;
use HTTP::Proxy::BodyFilter::simple;
use HTTP::Proxy::BodyFilter::complete;
my $proxy = HTTP::Proxy->new;
# pass the complete response body to our filter (in one pass)
$proxy->push_filter(
mime => 'text/html',
response => HTTP::Proxy::BodyFilter::complete->new,
response => HTTP::Proxy::BodyFilter::simple->new(
sub {
my ( $self, $dataref, $message, $protocol, $buffer ) = @_;
# some complex processing that needs
# the whole response body
}
);
);
$proxy->start;
DESCRIPTION
The HTTP::Proxy::BodyFilter::complete filter will ensure that the next filter in the filter chain will only receive complete message bodies
(either request or response).
It will store the chunks of data as they arrive, only to pass the entire message body after the whole message has been received by the
proxy.
Subsequent filters is the chain will receive the whole body as a big piece of data.
CAVEAT EMPTOR
This consumes memory and time.
Use with caution, otherwise your client will timeout, or your proxy will run out of memory.
Also note that all filters after "complete" are still called when the proxy receives data: they just receive empty data. They will receive
the complete data when the filter chain is called for the very last time (the $buffer parameter is "undef"). (See the documentation of
HTTP::Proxy::BodyFilter for details about the $buffer parameter.)
METHOD
This filter defines two methods, called automatically:
filter()
Stores the incoming data in memory until the last moment and passes empty data to the subsequent filters in the chain. They will
receive the full body during the last round of filter calls.
will_modify()
This method returns a false value, thus indicating to the system that it will not modify data passing through.
AUTHOR
Philippe "BooK" Bruhat, <book@cpan.org>.
THANKS
Thanks to Simon Cozens and Merijn H. Brandt, who needed this almost at the same time. ";-)"
COPYRIGHT
Copyright 2004-2008, Philippe Bruhat.
LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
perl v5.12.4 2011-07-03 HTTP::Proxy::BodyFilter::complete(3pm)