]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
net_reader: note glob support in .onion hint
authorEric Wong <e@80x24.org>
Tue, 3 Oct 2023 06:43:52 +0000 (06:43 +0000)
committerEric Wong <e@80x24.org>
Tue, 3 Oct 2023 10:16:10 +0000 (10:16 +0000)
It's only available for git 2.26+ users, but I figure most
distros have it at this point.

lib/PublicInbox/NetReader.pm

index 76fd3892b73d55365519e3670b7943c56714e986..95cf1de893a1af9b39b43666507a2bd59d06263a 100644 (file)
@@ -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
 }