use strict;
use LWP::UserAgent::Proxified;
open( ROUTES, "<", "/etc/squid/repeater/lib/routes.cfg" )
or die "open: $!";
my @proxylist;
while( <ROUTES> ) {
s/#.*//;
next if /^(\s)*$/;
chomp;
push @proxylist, http => "http://uname:passwd\@$_" if !/DISABLED/;
}
close(ROUTES);
my $ua = LWP::UserAgent::Proxified->new(
agent => undef,
proxylist => \@proxylist,
proxyrand => 1
);
# do the job
|