Query: lwp::protocol::socks
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
LWP::Protocol::socks(3pm) User Contributed Perl Documentation LWP::Protocol::socks(3pm)NAMELWP::Protocol::socks - adds support for the socks protocol and proxy facilitySYNOPSISuse LWP::Protocol::socks;DESCRIPTIONUse this package when you wish to use a socks proxy for your connections. It provides some essential hooks into the LWP system to implement a socks "scheme" similar to http for describing your socks connection, and can be used to proxy either http or https connections. The use case is to use LWP::UserAgent's proxy method to register your socks proxy like so: $ua->proxy([qw(http https)] => 'socks://socks.yahoo.com:1080'); Then just use your $ua object as usual!EXAMPLES#!/usr/local/bin/perl use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5'); # for socks5, use socks like so: $ua->proxy([qw(http https)] => 'socks://socks.yahoo.com:1080'); # for socks4, use socks4 like so: $ua->proxy([qw(http https)] => 'socks4://socks.yahoo.com:1080'); my $response = $ua->get("http://www.freebsd.org"); print $response->code,' ', $response->message," "; my $response = $ua->get("https://www.microsoft.com"); print $response->code,' ', $response->message," ";NOTESI don't have much time to contribute to this. If you'd like to contribute, please fork https://github.com/scr/cpan and send me a pull request.AUTHORSSheridan C Rawlins <sheridan.rawlins@yahoo.com> Oleg G <oleg@cpan.org> perl v5.14.2 2012-02-12 LWP::Protocol::socks(3pm)
Related Man Pages |
---|
lwp::protocol::https(3) - mojave |
lwp::protocol::https5.18(3) - mojave |
dump_socksfc(8) - mojave |
dump_socksfc(8) - ultrix |
dump_socksfc(8) - minix |
Similar Topics in the Unix Linux Community |
---|
file sorting |
Filtering a file for unique entries |
[Solved] Split file using awk |
Can't connect through ssh socks proxy to certain sites |
Proxy socks tester issue |