You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user does not pass --tor-proxy (or --i2p-proxy, or --with-domains), the corresponding checker is assigned a CheckerMock (maigret/checking.py:557) whose check() returns ('', 0, None). Every .onion / .i2p / domain entry in the database is then dispatched to that mock at maigret/checking.py:845–847 via options["checkers"][site.protocol].
A status_code of 0 is interpreted by _make_request at maigret/checking.py:158 as CheckError("Connection lost"). The end-user sees a "Connection lost" error for every .onion site instead of an honest "skipped because no Tor gateway is configured" signal.
This is misleading in three ways:
The site is not actually unreachable — it was never tried.
--print-errors is polluted with fake "Connection lost" entries (3 sites today: HiddenAnswers, DarkNet Trust, i2pforum).
Real connection-lost errors on clearweb sites become harder to spot.
Proposed fix
Either:
(a) extend MaigretCheckStatus (or reuse the existing ILLEGAL) and short-circuit dispatch when site.protocol in ("tor", "i2p") and the corresponding proxy is missing, returning an explicit SKIPPED — no Tor gateway configured status; or
(b) instantiate the proxied checker lazily, only after the dispatcher confirms a site needs it, and skip the site cleanly otherwise.
Acceptance
Running maigret <user> without --tor-proxy produces no "Connection lost" entries for .onion sites.
The CLI and JSON report visibly mark .onion sites as skipped, with a one-line explanation.
A regression test in tests/test_checking.py (new) verifies the dispatch path.
Code refs
maigret/checking.py:557 (CheckerMock definition)
maigret/checking.py:1105–1122 (the three bare # TODO comments above the mock fallbacks)
maigret/checking.py:845–847 (dispatch by site.protocol)
Related
Can't get Maigret to work on Tails over Tor? #544 (Tor/proxy documentation). The Tor-and-proxies docs page currently says ".onion sites are silently skipped", which is also inaccurate — merging this fix lets us tighten that wording.
Two of the three onion entries in data.json are also rotten today (DarkNet Trust uses a v2 onion address that Tor deprecated in October 2021); cleaning that up is a separate concern but is part of the same audit.
Problem
When the user does not pass
--tor-proxy(or--i2p-proxy, or--with-domains), the corresponding checker is assigned aCheckerMock(maigret/checking.py:557) whosecheck()returns('', 0, None). Every.onion/.i2p/ domain entry in the database is then dispatched to that mock atmaigret/checking.py:845–847viaoptions["checkers"][site.protocol].A
status_codeof0is interpreted by_make_requestatmaigret/checking.py:158asCheckError("Connection lost"). The end-user sees a "Connection lost" error for every.onionsite instead of an honest "skipped because no Tor gateway is configured" signal.This is misleading in three ways:
--print-errorsis polluted with fake "Connection lost" entries (3 sites today:HiddenAnswers,DarkNet Trust,i2pforum).Proposed fix
Either:
MaigretCheckStatus(or reuse the existingILLEGAL) and short-circuit dispatch whensite.protocol in ("tor", "i2p")and the corresponding proxy is missing, returning an explicitSKIPPED — no Tor gateway configuredstatus; orAcceptance
maigret <user>without--tor-proxyproduces no "Connection lost" entries for.onionsites..onionsites as skipped, with a one-line explanation.tests/test_checking.py(new) verifies the dispatch path.Code refs
maigret/checking.py:557(CheckerMockdefinition)maigret/checking.py:1105–1122(the three bare# TODOcomments above the mock fallbacks)maigret/checking.py:158(wherestatus_code=0becomes "Connection lost")maigret/checking.py:845–847(dispatch bysite.protocol)Related
data.jsonare also rotten today (DarkNet Trustuses a v2 onion address that Tor deprecated in October 2021); cleaning that up is a separate concern but is part of the same audit.