I like to connect to a website over a proxy, using the LWP::UserAgent. So I write this little script
#!/usr/bin/perl -w use LWP::UserAgent; #Tried this notation $ENV{HTTPS_PROXY} = 'http://115.238.164.208:8080'; my $ua = LWP::UserAgent->new(); #Also tried this notation #$ua->env_proxy( ); #$ua->proxy(['https'], 'http://115.238.164.208:8080'); my $req = HTTP::Request->new(GET => 'http://google.de'); my $res = $ua->request($req); if($res->is_success) { print "Proxy works fine\n"; #print $res->decoded_content; } else { print "Proxy dont work\n"; }
The Problem I have is that I can change the Proxy IP Adress to something silly like http://blabla.com and it work too. Did I do something wrong? If not is there a way to tell the UserAgent only go over the proxy
In reply to Issue with LWP:UserAgent use Proxy by Drizzt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |