lib/PublicInbox/LeiCurl.pm | 5 +++++ diff --git a/lib/PublicInbox/LeiCurl.pm b/lib/PublicInbox/LeiCurl.pm index ce57e7963ae98743440e58f64640f10661ff9cb4..5ffade9976cb43a194e784c955d4b515d2b8a90f 100644 --- a/lib/PublicInbox/LeiCurl.pm +++ b/lib/PublicInbox/LeiCurl.pm @@ -75,6 +75,11 @@ # completes the result of cmd() for $uri 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); }