btoovey has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to build a perl program which uses different types of proxies to bounce communication. This program uses ithreads.

In the case of Crypt::SSLeay, it reads a variable from ENV to decide weather to use a proxy, but in a threaded environment ENV does not seem to work right, as when I set a value and go to print it it is blank. Maybe the main thread is the only one with set privileges - I need to test further.

Anyway I have been using the sockschain module for socks connections, and upon further reading it supports HTTP connections. I was wondering if someone could guide me on its usage for HTTP proxies, as I keep receiving 500 Forbidden errors when trying to implement it for HTTP:
$proxy_list[0] = # "vpn" . $tid . ".findnot.com:1088:user:pass:5 proxy"; $proxy[2] . ":" . $proxy[3] . ":" . $proxy[4] . ":" . $proxy[5] . ":" . $proxy_type . ":HTTP proxy"; LWP::Protocol::implementor( http => 'LWP::Protocol::http::Sock +sChain' ); @LWP::Protocol::http::SocksChain::EXTRA_SOCK_OPTS = ( Chain_Len => 1, Debug => 8, Random_Chain => 0, Auto_Save => 1, Restore_Type => 1, Log_file => "/root/connector/sockschainlog", Chain_File_Data => \@proxy_list, HTTP_CLIENT => "Mozilla/4.0 (compatible; MSIE 7.0; Windows + NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2)" ); LWP::Protocol::implementor( https => 'LWP::Protocol::https::SocksChain' ); @LWP::Protocol::https::SocksChain::EXTRA_SOCK_OPTS = ( Chain_Len => 1, Debug => 1, Random_Chain => 0, Auto_Save => 1, Restore_Type => 1, Log_file => "/root/connector/sockschainlog1", Chain_File_Data => \@proxy_list );
So basically I a passing an array with a value for proxy type - if its "5" it is a socks five server, if its "0" its an HTTP server. Works fine for SOCKS, I get forbidden when trying against 30 anonymous HTTP servers.

Documentation on the pm is at:
http://search.cpan.org/src/GOSHA/LWP-Protocol-http-SocksChain-1.4/README
http://search.cpan.org/src/GOSHA/Net-SC-1.20/README