3

I have a very simple example Perl script

$ cat proxy.pl
use strict;
use warnings;
use LWP::UserAgent ();

my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->show_progress(1);
$ua->proxy([
    [ 'http' ] => 'http://142.93.46.194:3128/',
]);
$ua->get('http://example.com');

which prints following output

$ perl proxy.pl 
** GET http://example.com ==> 200 OK

Any ready-to-use module which adds to debug output one more string which shows proxy server connection status ?

Paul Serikov
  • 2,550
  • 2
  • 21
  • 36
  • What do you mean by "proxy server connection status"? Look at LWP::Protocol::http -> sub request. – user4035 Apr 26 '19 at 03:01
  • Well, `200 OK` is proxy server connection status. You are connecting to a proxy and asking it to get http://example.com for you, in theory it might not even try to get http://example.com and still return `200 OK` :-) – eyevan Apr 28 '19 at 23:21

0 Answers0