Security model
What a Tor-only security model actually guarantees
TDM (T[or] Download Manager) is an internet download manager that routes all of its traffic over the Tor network, anonymizing every file transfer. This review examines the current security and privacy model. It is based on a close reading of the source code, the application’s proxy configuration, its download logic, and its connection check.
Qt framework
TDM source code is based on Qt. Qt is a modern cross-platform C++ application framework, best known for powering graphical user interfaces, including KDE on Linux and countless desktop, embedded, and mobile applications. It also includes modules for networking, databases, multimedia, and more.
Qt is quite strong for networking. The Qt Network module is one of its core, well-maintained modules and handles most application-level needs without third-party libraries.
The threat model
Any privacy tool should be judged against the adversary it claims to defend against. For a Tor-routed downloader, the relevant adversaries are:
- A passive network observer: your ISP, your employer, your hotel Wi-Fi. They may learn that you use Tor, and nothing about what you download.
- The destination server: it should see a Tor exit node’s address, not yours.
- A local attacker or forensic examiner: should find no record of your download targets in logs or scrollback, yet application memory, swap, and OS-level logs can retain traces regardless of app design.
- Accidental self-exposure: the application itself must not leak your real IP through a misconfigured request, a local DNS lookup, or a link handed to an unproxied browser.
Points 1 and 2 are handled by Tor itself, provided the application actually uses it. Points 3 and 4 are where application code earns or loses trust. Most of this text concerns those two.
How the current design enforces the model
An application-wide proxy, installed before anything else
The first substantive act is to configure a SOCKS5 proxy and install it process-wide:
proxy.setType( QNetworkProxy::Socks5Proxy );
proxy.setHostName( "127.0.0.1" );
proxy.setPort( 9150 );
QNetworkProxy::setApplicationProxy( proxy );
This ordering is deliberate and correct. setApplicationProxy() establishes the process-wide default that any QAbstractSocket or QTcpSocket with DefaultProxy type will inherit. Because it runs before the UI is built and before any request can be issued, no network operation in this file can precede it.
Per Qt’s documentation, setting a default proxy this way also overrides any application proxy factory set earlier and disables the use of system proxy settings. That is the desired behaviour for a Tor-only tool: a user’s proxy configuration should not silently interpose itself.
Fail-closed by construction
The proxy is hardcoded to 127.0.0.1:9150. There is no fallback path, no “try direct if the proxy fails” branch, no configuration option that relaxes it. If nothing is listening on that port, requests fail.
Crucially, Qt does not retry directly when a proxy connection fails. It surfaces the failure as an error. The evidence lies in Qt’s error taxonomy: there is a dedicated QNetworkReply::ProxyConnectionRefusedError, documented as “the connection to the proxy server was refused (the proxy server is not accepting requests).”
The practical consequence: with Tor down, the application produces a warning and refuses to proceed. It does not quietly download over the clearnet. The failure mode is refusal, not leakage.
DNS never touches the local resolver
DNS leaks are the classic way a supposedly Tor-routed application betrays its user. TDM avoids that, and the mechanism is worth understanding.
The proxy is constructed as a plain QNetworkProxy(QNetworkProxy::Socks5Proxy). Qt’s documented defaults for SOCKS5 include HostNameLookupCapability, defined as the ability “to connect to perform the lookup on a remote host name and connect to it, as opposed to requiring the application to perform the name lookup and request connection to IP addresses only.”
In practice, Qt hands the bare hostname to the SOCKS5 proxy and lets Tor resolve it at the exit node. No getaddrinfo(), no query to your system resolver, no packet to port 53.
The code cooperates with this. URLs are passed directly into QNetworkRequest, and the only place the code inspects a URL’s structure (saveFileName()) parses the path as a string without resolving anything.
The verification probe
The code queries check.torproject.org/api/ip through the application’s own QNetworkAccessManager:
QNetworkReply *reply = manager.get(
QNetworkRequest(QUrl("https://check.torproject.org/api/ip")));
and asserts that the response reports IsTor: true before permitting a download.
Three properties make this a genuine verification:
- It exercises the real code path: The probe uses the same
QNetworkAccessManagerand therefore the same proxy configuration as downloads. A passing check is direct evidence that the path downloads will take is functioning. - It verifies the outcome, not the configuration: The check asks “does the outside world see me as a Tor user?”
- It distinguishes failure modes: A refused connection to the proxy means Tor is not running. A timeout means Tor is bootstrapping without a circuit yet, also can be a stalled circuit, a slow middle node, or the machine’s network being down. The user should treat timeout as “Tor not reachable/no circuit available”). A successful response reporting
IsTor: falsemeans the checking endpoint did not identify the observed address as a Tor exit — a categorically different and more alarming condition. These warrant different messages to the user, and the implementation treats them as distinct.
Residual risks
Any network activity occurring before installing the proxy is unprotected. Concrete ways main.cpp could defeat the model:
- Initialization order: If
main.cppconstructs aQNetworkAccessManager, or performs any request (a version check, an update ping, a splash-screen fetch, telemetry, a licence validation) before the proxy is constructed, that request goes direct. The application proxy does not exist yet. - Application proxy factory precedence: Qt 6 documents that
QNetworkProxy::setApplicationProxy()overrides an existing application-wide proxy factory, whileQNetworkProxyFactory::setApplicationProxyFactory()overrides the application-wide proxy configured throughQNetworkProxy::setApplicationProxy(). Consequently, whichever configuration is applied last determines the effective application-wide proxy mechanism. This is not a documentation inconsistency, but an important configuration-order consideration. In TDM, the SOCKS5 proxy is installed throughQNetworkProxy::setApplicationProxy(). Therefore, any subsequent call toQNetworkProxyFactory::setApplicationProxyFactory()could replace that configuration and alter proxy routing. The application must ensure that no later initialization or component silently replaces the intended proxy configuration. - Explicit disabling: A single
QNetworkProxy::setApplicationProxy(QNetworkProxy::NoProxy)anywhere inmain.cppwould disable the entire model. - Child processes:
QProcessinvocations are invisible to Qt’s proxy machinery. A spawned updater, a shell command, or a helper utility would connect directly. - Native or third-party network code: Any linked library using raw sockets, libcurl, or an OS networking API bypasses the proxy entirely. Qt’s proxy layer only covers Qt’s own network classes.
- Static initializers: Global objects in
main.cpp‘s translation unit can execute code beforemain()begins. A network call from one of those would precede everything.
It is worth mentioning that none of the described residual risks are present in the codebase.
Dependence on check.torproject.org
The verification probe introduces a third-party dependency into the security-critical path.
The endpoint is not officially documented by the Tor Project. Its response format is stable and widely relied upon, but there is no specification, no versioning commitment, and no service-level guarantee. Community reports show it has experienced outages. Rate limits apply, and it is not designed for high-frequency polling.
Practical implications: the check can fail for reasons unrelated to the user’s actual Tor status, producing a false negative that blocks downloads. Conversely, if the endpoint’s response schema ever changed, naive parsing could produce a false positive.
Point-in-time verification
The check runs once at startup and once when the user initiates a download. It does not monitor the connection during a transfer.
If Tor’s connection degraded mid-download (a circuit torn down, the daemon restarted, a network change) nothing in the current design would notice. The download would fail (because the proxy is unreachable and there is no fallback), which is the right outcome, but the failure would surface as a generic network error rather than a security-relevant event.
This is a minor concern given the fail-closed architecture, but it means the check should be understood as a pre-flight gate, not continuous assurance.
Conclusion
The current security model of T Download Manager is, on its own terms, coherent. Traffic is forced through an application-wide SOCKS5 proxy installed before any request can be made. DNS resolution is delegated to the proxy rather than performed locally. There is no fallback to a direct connection when the proxy is unavailable, so failures are refusals rather than leaks. The verification routine asks a question with a meaningful answer.
Those are real strengths, and the fail-closed posture is the right architectural instinct; it is the same principle behind Tails’ firewall design, arrived at independently.
