Skip to content

Commit 5c129e2

Browse files
thesamesammgorny
authored andcommitted
openpgp: disable Tor use in dirmngr
Pass 'no-use-tor' to avoid automagically using Tor if it's available on the system (which gnupg does by default)! This often causes connectivity issues and is a source of great confusion for users. See also d54fc1c3f35dca78a66dde10b857ab9ee54c68bc in getuto. Signed-off-by: Sam James <[email protected]> Closes: #34 Signed-off-by: Michał Górny <[email protected]>
1 parent 6ed34d7 commit 5c129e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: gemato/openpgp.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# gemato: OpenPGP verification support
2-
# (c) 2017-2023 Michał Górny
2+
# (c) 2017-2024 Michał Górny
33
# SPDX-License-Identifier: GPL-2.0-or-later
44

55
import base64
@@ -413,10 +413,13 @@ def __init__(self, debug=False, proxy=None, timeout=None):
413413

414414
with open(os.path.join(self._home, 'dirmngr.conf'), 'w') as f:
415415
f.write(f'''# autogenerated by gemato
416-
417416
# honor user's http_proxy setting
418417
honor-http-proxy
419418
419+
# Disable automagically using Tor when running. This often leads
420+
# to connectivity issues and is unexpected for users.
421+
no-use-tor
422+
420423
# The default of "recursive-resolver" (see "man dirmngr") may cause
421424
# problems with corporate networks, where this is often prohibited.
422425
# It's better to setup the DNS resolver of your choice correctly

0 commit comments

Comments
 (0)