From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1375F1F56B for ; Tue, 3 Oct 2023 06:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696315434; bh=dTpfiMk9ifnqgt7Rh7szKPKhCgC4LajhVNGDhShggks=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TJK9/r7z5/HN9DlVvtJqkBLe8eSVAXXM/iggQGvCYuRlHP5cpDId18qQZrwJHPFpr LGk5m30y/JMC+5j3X9gc3PTYTWDIArPng3z1+XqJCKOxe6Y6MF9uZ3IyeaHSAMNB36 DHgfX8RYm04lw6LfE0eILlOJtSK4kIVlJpcWLHbo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 8/8] net_reader: note glob support in .onion hint Date: Tue, 3 Oct 2023 06:43:52 +0000 Message-ID: <20231003064352.2902298-9-e@80x24.org> In-Reply-To: <20231003064352.2902298-1-e@80x24.org> References: <20231003064352.2902298-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It's only available for git 2.26+ users, but I figure most distros have it at this point. --- lib/PublicInbox/NetReader.pm | 5 +++++ 1 file changed, 5 insertions(+) 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 }