Using the --proxy on the command-line affects the entire
lei invocation, and users searching HTTP(S) remotes and
writing to an IMAP folder may want more fine-grained proxy
use:
lei q -o imap://no-proxy.example/foo -O https://need-proxy.example/bar ...
sub for_uri {
my ($self, $lei, $uri, @opt) = @_;
my $pfx = torsocks($self, $lei, $uri) or return; # error
+ if ($uri->scheme =~ /\Ahttps?\z/i) {
+ my $cfg = $lei->_lei_cfg;
+ my $p = $cfg ? $cfg->urlmatch('http.Proxy', $$uri) : undef;
+ push(@opt, "--proxy=$p") if defined($p);
+ }
bless [ @$pfx, @$self, @opt, $uri->as_string ], ref($self);
}