01 #!/usr/local/bin/perl -w 02 use strict; 03 use HTTP::Proxy; 04 use HTTP::Proxy::HeaderFilter::simple; 05 06 my $proxy = HTTP::Proxy->new( 07 host => "192.168.1.123", 08 port => 9999 ); 09 10 $proxy->push_filter( 11 request => 12 HTTP::Proxy::HeaderFilter::simple->new( 13 sub { 14 my( $self ) = @_; 15 print $self->proxy->request->uri(), 16 "\n"; 17 } 18 ) 19 ); 20 21 $proxy->start;