sockschain

Discussion in 'Perl Misc' started by begiorgio@gmail.com, Mar 16, 2007.

  1. Guest

    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;
    }

    }
     
    , Mar 16, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page