2026-11-01 - Anti-DDoS PoW Gate solver, per-worker circuit isolation, sparse NTFS allocation, ARM64 target
Onion Downloader combines a native graphical queue and a complete command-line downloader in one
2.64 MiB (2,771,456-byte) Windows executable. Its original HTTP, SOCKS5, range scheduling and resume engines spread
one file over multiple independent Tor circuits. An in-process pure C++ SHA-256 Proof-of-Work (PoW) solver (5–15 ms)
defeats modern Onion anti-DDoS challenge gates (/_gate/challenge//_gate/verify), and per-worker session cookie isolation
bypasses server-side connection concurrency limits to unlock full aggregate wire speed. A specialized client-only
Tor 0.4.9.11 is packed into the application's icon resource—no installer, browser bundle, external runtime
or loosetor.exerequired.
Graphical queue - a multi-gigabyte transfer spread across ten parallel circuits

Command line - the same engine and the same binary, od_x64.exe --help

Downloading a large file through one Tor circuit means that one slow path controls the whole transfer. Onion Downloader takes a different route. If an HTTP server supports byte ranges, the file is divided into independent regions and fetched by parallel workers distributed over several Tor daemons. Every daemon maintains its own circuits, so a weak route can continue working without preventing faster routes from advancing other parts of the file.
This is not a browser automation tool and it does not contain pieces of Tor Browser. The application implements the downloader itself: HTTP requests and response parsing, native SHA-256 Anti-DDoS PoW challenge solving, SOCKS5 negotiation, range planning, direct random-access sparse writes, progress accounting, queue persistence and validated resume metadata. Tor is used for Onion transport and nothing else.
| Property | Current release |
|---|---|
| Final executable | 2.64 MiB x64 (2,771,456 bytes) • 2.10 MiB ARM64 (2,200,064 bytes) |
| Platform | Windows x64 and native ARM64 (Windows on ARM) |
| Default parallelism | 10 range workers |
| Tor process pool | Automatically selected, normally 2-8 daemons (ports 19050+) |
| Anti-DDoS Gate Solver | Pure C++ SHA-256 (5–15 ms) for /_gate/challenge |
| Session Architecture | Per-worker isolated gate_sid session cookies |
| Disk Allocation | NTFS sparse pre-allocation (FSCTL_SET_SPARSE) |
| Embedded Tor | 0.4.9.11, client-only, proof-of-work enabled |
| Interface | Native Win32 GUI and CLI in the same PE file |
| Runtime dependencies | Windows system libraries only |
| Default destination | Current user's Windows Downloads folder |
Real speed still depends on the Onion service, its range support, relay conditions and the user's connection. Multi-circuit scheduling removes the single-route bottleneck; it cannot manufacture bandwidth the remote service does not have.
/_gate/challenge in 5–15 ms without any bloated JavaScript runtime.gate_sid cookie, defeating server-side limit_conn throttling that previously choked multi-stream transfers to ~100 KB/s.%20) and Unicode characters in Onion paths according to RFC 3986.FSCTL_SET_SPARSE to reserve file bounds instantly with zero physical disk zero-fill overhead.od_x64.exe and od_arm64.exe, each embedding its own native Tor engine; the ARM64 build runs natively on Windows on ARM, not under x64 emulation.Range is downloaded as one ordinary stream instead of producing a corrupted file.ReplaceFileW.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE) and are terminated instantly with the application.od_x64.exe is a dual-mode executable in the same sense as a good native system utility: the presence and meaning of command-line arguments choose the interface, not a second launcher.
With no arguments it enters its Win32 message loop and presents the graphical queue. With a URL it behaves as a console downloader suitable for batch files and terminals. Both heads call the same coordinator and share every important implementation below the presentation layer. A transfer created in either mode follows the same range validation, circuit allocation and part-file rules.
| Invocation | Behaviour |
|---|---|
od_x64.exe |
Launch the graphical interface |
od_x64.exe http://service.onion/file.zip |
Download through the CLI using the default worker and circuit policy |
od_x64.exe --gui |
Explicitly launch the GUI |
od_x64.exe --help |
Print command-line usage |
Each Tor instance gets an isolated data directory and SOCKS listener. The pool waits for bootstrap rather than treating a process launch as network readiness. Workers open SOCKS5 connections to the Onion hostname through selected instances and write only into their assigned regions of the pre-sized part file.
Modern high-traffic Onion services protect themselves from denial-of-service attacks by deploying dynamic Proof-of-Work challenges. When an unauthenticated request hits the service, it responds with HTTP 401 Unauthorized or redirects to /_gate/challenge:
Standard CLI tools (curl, wget, aria2) fail with HTTP 401 because they lack PoW gate support. Tor Browser succeeds because it runs a client-side JavaScript Web Worker. Onion Downloader achieves the same compatibility natively: its in-process pure C++ SHA-256 engine finds the valid nonce in 5 to 15 milliseconds, without the memory or startup overhead of a JavaScript runtime.
Early multi-stream onion downloaders encountered a puzzling performance trap: configured for 10 parallel connections, the total transfer speed remained throttled at ~100 KB/s.
Onion reverse proxies enforce strict per-session concurrency controls:
limit_conn_zone $cookie_gate_sid zone=session_limit:10m;
limit_conn session_limit 1;
limit_rate 150k;
When 10 workers over different Tor circuits passed the same gate_sid cookie, the reverse proxy identified them as the same client session and throttled cumulative throughput to a single stream's quota.
Onion Downloader gives every worker thread its own private session:
gate_sid cookie.Onion paths frequently contain unencoded spaces, brackets, or Unicode characters (for example, /Data Archive (2026)/Sample File.iso). Raw spaces violate HTTP/1.1 request line syntax and trigger HTTP 400 Bad Request.
HttpClient::SanitizeRequestPath parses the URI path, preserves delimiters (/, ?, &, =, #), and automatically percent-encodes spaces to %20 and non-ASCII characters to standard percent-encoded octets. Clipboard paste and drag-and-drop inputs in the GUI automatically trim whitespace and normalize quotes.
The most important decisions are encoded as invariants rather than UI conventions:
A naive parallel downloader cuts a file into exactly as many pieces as it has workers. Over Tor, circuit speeds can differ by an order of magnitude. Onion Downloader creates a dynamic work queue with a target of eight segments per worker (2 MiB to 16 MiB each). Workers claim the next available segment dynamically, letting fast circuits complete multiple regions while a slower circuit is still handling one.
Progress bytes are useful for presentation but are not the source of resume truth. A segment changes from Pending to InFlight when claimed and to Complete only after its entire expected body has been received and written. The completion bitmap never claims that a partially received segment is durable.
The initial probe asks for byte zero only. Parallel mode is accepted only when the response is HTTP 206, contains a parseable Content-Range, and reports a non-zero total instance length.
Every worker authenticates to SOCKS5 with its own generated isolation username. When a connection fails, the socket closes and the credential nonce advances before the range is retried. Tor's IsolateSOCKSAuth policy prevents the retry from silently returning to the path that just stalled.
Pause cannot merely set a Boolean and wait for a long receive timeout. Each live HttpConnection is registered with the job; cancellation closes its atomic socket handle, which wakes a thread blocked inside Winsock.
The part file is opened once, but each worker performs explicit offset-based writes (SetFilePointerEx + WriteFile). No shared sequential file position exists to race between threads.
An unfinished archive.zip is represented by two files next to the future destination:
| File | Purpose |
|---|---|
archive.zip.odpart |
Sparse data file pre-allocated with FSCTL_SET_SPARSE; completed ranges occupy final offsets |
archive.zip.odmeta |
Small JSON description used to validate the URL, expected size and completed segment map |
Resume metadata is checkpointed at controlled intervals and committed atomically via a temporary file (.odmeta.tmp) and ReplaceFileW. Instantaneous transfer speed upon resume is calculated strictly from active newly transferred bytes, preventing artificial speed spikes.
/MT—no VC++ Redistributable needed.resources/app.ico.cabinet.dll directly to %LOCALAPPDATA%\od\tor\bin.| Tor capability | Included? | Reason |
|---|---|---|
| Onion client and SOCKS proxy | Yes | Core transport required by the downloader |
| Onion-service proof-of-work client | Yes | Required for compatibility with services defending themselves under load |
| Relay module | No | Onion Downloader never carries traffic for other clients |
| Directory authority module | No | It never operates Tor network authority infrastructure |
| Directory cache role | No | It is a client, not a public cache |
| Unit tests, manuals and Tor applications | No | Build-time material, not runtime client functionality |
System-wide torrc |
No | Each managed process receives its explicit private configuration |
The embedded engine uses Tor 0.4.9.11 compiled inside Ubuntu under WSL via MinGW-w64. The output is a native Windows PE executable with ASLR, high-entropy ASLR, and NX compatibility.
A second native ARM64 (AArch64) engine is cross-compiled with llvm-mingw (clang, aarch64-w64-mingw32). The ARM64 build od_arm64.exe embeds this native engine: nothing runs under emulation on Windows on ARM.
The GUI uses native controls, PerMonitorV2 scaling, system light/dark preference, and Mica on Windows 11. The ListView uses double buffering and diffed cell updates to eliminate flickering during rapid progress refreshes.
Paste an Onion URL with Ctrl+V anywhere in the main window, drag and drop a URL, or type into the address field.
od_x64.exe http://example.onion/dataset.zip
od_x64.exe -s 20 -c 8 -o D:\Data http://example.onion/bigfile.bin
od_x64.exe --gui
| Option | Meaning |
|---|---|
<URL> |
Target HTTP address, normally an Onion service |
-s, --split <N> |
Parallel workers; default 10, maximum 64 |
-c, --circuits <N> |
Independent Tor daemons; default automatic, normally 2-8 |
-o, --out <dir> |
Destination directory; default is the user's Downloads folder |
-g, --gui |
Launch the graphical interface explicitly |
-h, --help |
Print help and exit |
-v, --version |
Print version and build information |
| Area | Responsibility |
|---|---|
src/core/DownloadEngine.* |
Job lifecycle, probing, worker creation, retry policy, progress monitoring and finalization |
src/core/SegmentMap.* |
Dynamic range work queue, Pending/InFlight/Complete state and compact resume bitmap |
src/core/PartFile.* |
Sparse NTFS writer (FSCTL_SET_SPARSE), independent offset writers, atomic metadata |
src/core/SessionManager.* |
GUI queue persistence and safe restoration of active work as Paused |
src/core/TorPool.* |
Private profiles, ports, process Job Object, control authentication, bootstrap |
src/core/TorExtractor.* |
In-memory Cabinet FDI callbacks, embedded payload fingerprint and local Tor cache |
src/net/Socks5.* |
Cancellable Winsock stream and SOCKS5 hostname connection with authentication isolation |
src/net/HttpClient.* |
URL parsing, HTTP requests, PoW SHA-256 solver, Range headers, path sanitization |
src/ui/OdWindow.* |
Native window lifecycle, queue interaction, clipboard, OLE drop target and command routing |
src/ui/Controls.* |
ListView subclass, owner-drawn controls and theme palettes |
src/cli/* |
Strict argument parsing, console ownership and terminal progress presentation |
/_gate/challenge puzzles under load and verify cookie persistence.gate_sid cookies across workers, defeating concurrency throttling.tor.exe child processes..odmeta integrity.# From the source-tree root:
.\build.ps1 # builds x64 AND ARM64
.\build.ps1 -Platform x64 # or a single architecture
.\build.ps1 -Platform ARM64
| Archive | Size | Description |
|---|---|---|
| od.7z | 4.08 MiB (4,283,101 bytes) | Both native binaries (od_x64.exe + od_arm64.exe), password: github.com |
| od.zip | 4.18 MiB (4,381,533 bytes) | Both native binaries (od_x64.exe + od_arm64.exe), standard ZIP (no password) |
| od_source_code.zip | 3.86 MiB (4,045,575 bytes) | Full clean C++23 source code, project files and build scripts |
Binaries inside the archives:
od_x64.exe: 2,771,456 bytes (2.64 MiB), native Intel/AMD x64 PEod_arm64.exe: 2,200,064 bytes (2.10 MiB), native Windows on ARM PEOnion Downloader's original source is released under the MIT License.
The embedded Tor executable remains a separate GPLv3-or-later program. OpenSSL, libevent and zlib retain their upstream licenses.
Marek Wesołowski - WESMAR
https://kvc.pl
Add a comment