sockschain

B

begiorgio

Hi, I've tried to use use LWP::protocol::http::SocksChain perl module
to concatenate proxys and socks. With socks it works but when I put a
proxy in the chain, I always get the error "500 connection not
allowable".

I'm using
Module Version: 1.4
and the latest perl version from activestate.

Can you please help? Do you know of any other way to concatenate a
proxy and a sock?
Thank you very much.

I've tried to use the following code with privoxy for the purpose of
testing; it doesn't work with any other http proxy anyway.

########
use LWP::UserAgent;
use LWP::protocol::http::SocksChain;
LWP::protocol::implementor( http =>
'LWP::protocol::http::SocksChain');

@LWP::protocol::http::SocksChain::EXTRA_SOCK_OPTS = (
Chain_Len => 1,
Debug => 1,
Random_Chain => 1,
Chain_File_Data => [
'127.0.0.1:8118:::0:1155 b/s privoxy',
#'127.0.0.1:9050:::5:1155 b/s tor',
],

Auto_Save => 0,
Restore_Type => 0 );

&socket();

sub socket{

my $ua = LWP::UserAgent->new();

my $res =
$ua->get('http://www.google.com');

if ($res->is_success) {
#print $res->content;
print $res->status_line;
} else {
print "failed";
print $res->status_line;
}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top