r1n0 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use HTTP::Proxy; use HTTP::Proxy::HeaderFilter::simple; use Digest::SHA1 qw(sha1_hex); my $proxy = HTTP::Proxy->new( host => '192.168.0.1', port => 8080 ); my $filter = HTTP::Proxy::HeaderFilter::simple->new( sub { my ($self, $headers, $request) = @_; my $uri = $request->uri(); my $client_ip = undef; #How does one ask for client IP? # debug printf "Client IP = %s\n", $client_ip; printf "URI = %s\n", $uri; printf "host = %s\n", $uri->host(); printf "path = %s\n", $uri->path(); printf "query = %s\n", $uri->query(); } ); $proxy->push_filter( request => $filter ); $proxy->start;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Identify Client IP Address while using HTTP::Proxy
by almut (Canon) on Oct 07, 2009 at 13:38 UTC | |
|
Re: Identify Client IP Address while using HTTP::Proxy
by Anonymous Monk on Oct 07, 2009 at 13:14 UTC |