From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5FE0C1F5AE for ; Fri, 30 Apr 2021 09:24:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/8] lei NNTP/IMAP .onion support and misc fixes Date: Fri, 30 Apr 2021 09:24:30 +0000 Message-Id: <20210430092438.20926-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Attempting to use torsocks(1) for NNTP or IMAP could get tricky. Fortunately, IO::Socket::Socks is packaged for on CentOS 7, FreeBSD, and Debian, so it seems to be a reasonable way to support NNTP and IMAP Tor onions. --proxy= (shared with curl) is supported for one-off command-line use, but imap.proxy and nntp.proxy are both supported along with URL-matching variants with git 1.8.5 (or git 2.26 for wildcard URL matching). Only socks5h:// proxies are supported (the default with IO::Socket::Socks), which is what Tor uses. I doubt its worth the effort (and potential for DNS request leaks) to support prior versions of SOCKS in 2021. Eric Wong (8): lei sucks: preserve utsname.machine, add "x86" where appropriate lei_curl: improve correctness of LD_PRELOAD check lei: kill old PIDs when dropping lei: ensure autoflush(1) is on STDERR net_reader: {nn,mic}_for: use prototypes for internal subs lei: IMAP .onion support via --proxy=s switch net_reader: Net::NNTP --proxy=socks5h:// support net_reader: support (imap|nntp).proxy in config file MANIFEST | 2 + lib/PublicInbox/Config.pm | 1 + lib/PublicInbox/LEI.pm | 24 ++++++++--- lib/PublicInbox/LeiCurl.pm | 2 +- lib/PublicInbox/LeiInput.pm | 2 +- lib/PublicInbox/LeiSucks.pm | 3 +- lib/PublicInbox/LeiToMail.pm | 4 +- lib/PublicInbox/NetNNTPSocks.pm | 33 +++++++++++++++ lib/PublicInbox/NetReader.pm | 72 +++++++++++++++++++++++++++------ xt/net_nntp_socks.t | 22 ++++++++++ 10 files changed, 141 insertions(+), 24 deletions(-) create mode 100644 lib/PublicInbox/NetNNTPSocks.pm create mode 100644 xt/net_nntp_socks.t