Imported Upstream version 1.6
Fabrizio Regalli
12 years ago
0 | 0 |
Revision history for Perl extension LWP::Protocol::socks.
|
1 | |
|
|
1 |
1.6 Sun Feb 12 09:54:12 PST 2012
|
|
2 |
- Fix Issue with newer LWP.
|
2 | 3 |
1.4 Tue Aug 23 23:19:57 PDT 2011
|
3 | 4 |
- Incorporate Oleg's fixes to the following bugs:
|
4 | 5 |
- https://rt.cpan.org/Ticket/Display.html?id=63468
|
0 | 0 |
--- #YAML:1.0
|
1 | |
name: LWP-Protocol-socks
|
2 | |
version: 1.5
|
3 | |
abstract: adds support for the socks protocol and proxy facility
|
4 | |
license: ~
|
5 | |
author:
|
|
1 |
name: LWP-Protocol-socks
|
|
2 |
version: 1.6
|
|
3 |
abstract: adds support for the socks protocol and proxy facility
|
|
4 |
author:
|
6 | 5 |
- Sheridan C Rawlins <sheridan.rawlins@yahoo.com>
|
7 | |
generated_by: ExtUtils::MakeMaker version 6.42
|
8 | |
distribution_type: module
|
9 | |
requires:
|
10 | |
IO::Socket::Socks: 0.2
|
11 | |
IO::Socket::SSL: 0.96
|
12 | |
LWP: 0
|
|
6 |
license: unknown
|
|
7 |
distribution_type: module
|
|
8 |
configure_requires:
|
|
9 |
ExtUtils::MakeMaker: 0
|
|
10 |
build_requires:
|
|
11 |
ExtUtils::MakeMaker: 0
|
|
12 |
requires:
|
|
13 |
IO::Socket::Socks: 0.2
|
|
14 |
IO::Socket::SSL: 0.96
|
|
15 |
LWP: 6.02
|
|
16 |
LWP::Protocol::https: 6.02
|
|
17 |
no_index:
|
|
18 |
directory:
|
|
19 |
- t
|
|
20 |
- inc
|
|
21 |
generated_by: ExtUtils::MakeMaker version 6.56
|
13 | 22 |
meta-spec:
|
14 | |
url: http://module-build.sourceforge.net/META-spec-v1.3.html
|
15 | |
version: 1.3
|
|
23 |
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
|
24 |
version: 1.4
|
1 | 1 |
use ExtUtils::MakeMaker;
|
2 | 2 |
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
|
3 | 3 |
# the contents of the Makefile that is written.
|
|
4 |
|
|
5 |
my $min_lwp_version = 0;
|
|
6 |
my @spec_deps;
|
|
7 |
eval {
|
|
8 |
require LWP;
|
|
9 |
};
|
|
10 |
if ($@ || $LWP::VERSION >= 6.02) {
|
|
11 |
# since LWP 6.02 LWP::Protocol::https was separated
|
|
12 |
push @spec_deps, 'LWP::Protocol::https', 6.02;
|
|
13 |
$min_lwp_version = 6.02;
|
|
14 |
}
|
|
15 |
|
|
16 |
|
4 | 17 |
WriteMakefile(
|
5 | 18 |
NAME => 'LWP::Protocol::socks',
|
6 | 19 |
VERSION_FROM => 'lib/LWP/Protocol/socks.pm', # finds $VERSION
|
7 | 20 |
'PREREQ_PM' => {
|
8 | 21 |
'IO::Socket::Socks' => 0.2,
|
9 | 22 |
'IO::Socket::SSL' => 0.96,
|
10 | |
'LWP' => 0,
|
|
23 |
'LWP' => $min_lwp_version,
|
|
24 |
@spec_deps
|
11 | 25 |
},
|
12 | 26 |
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
13 | 27 |
(ABSTRACT_FROM => 'lib/LWP/Protocol/socks.pm', # retrieve abstract from module
|
1 | 1 |
package LWP::Protocol::http::socks;
|
2 | 2 |
require LWP::Protocol::http;
|
3 | 3 |
our @ISA = qw(LWP::Protocol::http);
|
4 | |
our $VERSION = "1.5";
|
|
4 |
our $VERSION = "1.6";
|
5 | 5 |
LWP::Protocol::implementor('http::socks' => 'LWP::Protocol::http::socks');
|
6 | 6 |
|
7 | 7 |
sub new {
|
|
32 | 32 |
my $connectAddr = $args->{ConnectAddr} = delete $args->{PeerAddr};
|
33 | 33 |
my $connectPort = $args->{ConnectPort} = delete $args->{PeerPort};
|
34 | 34 |
|
35 | |
$self->SUPER::configure($args);
|
|
35 |
$self->SUPER::configure($args) or return;
|
36 | 36 |
$self->http_configure($args);
|
37 | 37 |
}
|
38 | 38 |
|
|
162 | 162 |
my $response = $ua->get("https://www.microsoft.com");
|
163 | 163 |
print $response->code,' ', $response->message,"\n";
|
164 | 164 |
|
|
165 |
=head1 NOTES
|
|
166 |
|
|
167 |
I don't have much time to contribute to this. If you'd like to
|
|
168 |
contribute, please fork https://github.com/scr/cpan and send me a pull
|
|
169 |
request.
|
|
170 |
|
165 | 171 |
=head1 AUTHORS
|
166 | 172 |
|
167 | 173 |
Sheridan C Rawlins E<lt>F<sheridan.rawlins@yahoo.com>E<gt>
|