about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-18 09:33:28 +0000
committerEric Wong <e@80x24.org>2021-09-18 20:25:29 +0000
commit0412486a4abac9938bf756e35292d7b01d659ba9 (patch)
tree7d07aa9ea261cfa00ace0555ee7951aa768d9ead /lib/PublicInbox
parente693f102e230796a13a648750b65b8ca38f04a16 (diff)
downloadpublic-inbox-0412486a4abac9938bf756e35292d7b01d659ba9.tar.gz
I think tying IO::Socket::Socks debugging to existing debug
switches is enough, and there's no need to introduce a separate
socks.Debug parameter.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/NetReader.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index 5725a155..e703cddb 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -35,7 +35,7 @@ sub socks_args ($) {
                 eval { require IO::Socket::Socks } or die <<EOM;
 IO::Socket::Socks missing for socks5h://$h:$p
 EOM
-                # for Mail::IMAPClient
+                # for IO::Socket::Socks
                 return { ProxyAddr => $h, ProxyPort => $p };
         }
         die "$val not understood (only socks5h:// is supported)\n";
@@ -51,6 +51,7 @@ sub mic_new ($$$$) {
                 require IO::Socket::Socks;
 
                 my %opt = %$sa;
+                $opt{SocksDebug} = 1 if $mic_arg{Debug};
                 $opt{ConnectAddr} = delete $mic_arg{Server};
                 $opt{ConnectPort} = delete $mic_arg{Port};
                 $mic_arg{Socket} = IO::Socket::Socks->new(%opt) or die
@@ -170,6 +171,7 @@ sub nn_new ($$$) {
         my $nn;
         if (defined $nn_arg->{ProxyAddr}) {
                 require PublicInbox::NetNNTPSocks;
+                $nn_arg->{SocksDebug} = 1 if $nn_arg->{Debug};
                 eval { $nn = PublicInbox::NetNNTPSocks->new_socks(%$nn_arg) };
                 die "E: <$uri> $@\n" if $@;
         } else {