+ } elsif ($opt =~ /^http-proxy=(.*)/) {
+ my $hp = $1;
+ if ($hp =~ /^(socks|http|https):\/\/($RE{net}{domain}|$RE{net}{IPv4}):([[:digit:]]+)\/?$/) {
+ if ('socks' eq $1) {
+ if ( ! Module::Load::Conditional::check_install(module => 'LWP::Protocol::socks')) {
+ $self->{logger}->log('error', "Requesting a socks proxy for hkpms, but LWP::Protocol::socks is not installed.\nThis will likely fail.\n");
+ }
+ }
+ $self->{proxy} = sprintf('%s://%s:%s', $1, $2, $3);
+ } else {
+ $self->{logger}->log('error', "Failed to make sense of this http-proxy address: '%s'; ignoring.\n", $hp);
+ }