I've added support for username/password authentication in the above 2
patches.
It's used as follows:-
$ua->proxy( [ 'http', 'https' ] => 'socks://user:pass@ip:port' ) ;
I tried to email the author but I've had no reply in the past couple of
weeks so I'm filing a bug report here to get this patched.
Thanks,
Jeff T. Parsons
Subject: | lwp-protocol-socks.pm.patch |
9a10
>
100a102,111
>
> my ($host, $port, $user, $pass) = ($proxy->host, $proxy->port, $proxy->user, $proxy->pass);
> my $authtype ;
>
> if ( $proxy->user ) {
> $authtype = 'userpass' ;
> } else {
> $authtype = 'none' ;
> }
>
102a114,116
> Username => $proxy->user,
> Password => $proxy->pass,
> AuthType => $authtype,
Subject: | uri-socks.pm.patch |
6a7,29
> sub user {
>
> my $self = shift ;
>
> my $old = $self->authority() ;
> my ( $user ) = $old =~ /^(.*?):/ ;
>
> return $user ;
> }
>
>
> sub pass {
>
> my $self = shift ;
> my $old = $self->authority() ;
>
> my ( $pass ) = $old =~ /^.*?:(.*?)\@/ ;
>
> return $pass ;
>
> }
>
>