]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiCurl.pm
lei_curl: improve correctness of LD_PRELOAD check
[public-inbox.git] / lib / PublicInbox / LeiCurl.pm
index 69c64cdfb0a5cd90d36ae6273961a96a2bdb73ca..ce57e7963ae98743440e58f64640f10661ff9cb4 100644 (file)
@@ -55,7 +55,7 @@ sub torsocks { # useful for "git clone" and "git fetch", too
        $opt->{torsocks} = 'false' if $opt->{'no-torsocks'};
        my $torsocks = $opt->{torsocks} //= 'auto';
        if ($torsocks eq 'auto' && substr($uri->host, -6) eq '.onion' &&
-                       (($lei->{env}->{LD_PRELOAD}//'') !~ /torsocks/)) {
+               ($PublicInbox::Config::LD_PRELOAD//'') !~ m!/libtorsocks\b!) {
                # "auto" continues anyways if torsocks is missing;
                # a proxy may be specified via CLI, curlrc,
                # environment variable, or even firewall rule