about summary refs log tree commit homepage
path: root/lib/PublicInbox/NetReader.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-03 06:43:52 +0000
committerEric Wong <e@80x24.org>2023-10-03 10:16:10 +0000
commitad722a4e32af5e2889be819b49ef31ecee4c3f2b (patch)
tree7862b88a00adf96f81eb704d96f29cb32a93e1a0 /lib/PublicInbox/NetReader.pm
parent91e8a857f4cc85a42d02c738d95c05d09febda0a (diff)
downloadpublic-inbox-ad722a4e32af5e2889be819b49ef31ecee4c3f2b.tar.gz
It's only available for git 2.26+ users, but I figure most
distros have it at this point.
Diffstat (limited to 'lib/PublicInbox/NetReader.pm')
-rw-r--r--lib/PublicInbox/NetReader.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index 76fd3892..95cf1de8 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -95,6 +95,7 @@ sub onion_hint ($$) {
         $uri->host =~ /\.onion\z/i or return "\n";
         my $t = $uri->isa('PublicInbox::URIimap') ? 'imap' : 'nntp';
         my $url = PublicInbox::Config::squote_maybe(uri_section($uri));
+        my $scheme = $uri->scheme;
         my $set_cfg = 'lei config';
         if (!$lei) { # public-inbox-watch
                 my $f = PublicInbox::Config::squote_maybe(
@@ -110,6 +111,10 @@ try configuring a socks5h:// proxy:
         url=$url
         $set_cfg $t.$dq\$url$dq.proxy socks5h://127.0.0.1:9050
 
+git 2.26+ users may instead rely on `*' to match all .onion URLs:
+
+        $set_cfg '$t.$scheme://*.onion.proxy' socks5h://127.0.0.1:9050
+
 ...before retrying your current command
 EOM
 }