use strict; use warnings; use LWP::UserAgent; use HTTP::Request; print "Connecting...\n"; my $ua = LWP::UserAgent->new( ); $ua->proxy(['http', 'https'], 'http://127.0.0.1:8888/'); my $url="https://www.google.com"; my $req = HTTP::Request->new(GET => $url); my $response = $ua->request($req); if ($response->is_success) { print "OK CONNECTION!\n"; } else{ print "NO CONNECTION!\n"; }