Shipped · v0.1.0
Project — 05 · tool · windows

Confluo

Every network you have, flowing into one download. Confluo splits one file over several connections and over several networks at once (Ethernet, Wi-Fi and a phone hotspot together), adds connections only when they actually buy speed, carries on byte-exact after a crash, and tells you the one thing that is holding the speed back. Confluo is Latin for “I flow together”.

paste a link → the live flow fills in (8 GiB from the test server, capped at 38 MiB/s)
try it · pour three networks into one fileinteractive

Switch networks on and off and watch the byte ranges move between them. The interactive demo loads here when scripts run.

  • 3.7× fasterthan an open-source Electron downloader on an unthrottled 1 GiB file (1.70 s vs 6.36 s, median of 7).
  • 2.6 MiBinstaller against 258 MiB. Ready about half a second after launch.
  • 11 hard killsduring one 1 GiB download, plus a server outage: the file still came out with the right SHA-256.
  • 0 accountsno ads, no telemetry. The browser bridge listens on 127.0.0.1 only.
The idea

Many streams, one file

A laptop often has two or three ways onto the internet at the same moment, and a download uses one of them. Download managers that open several connections still send them all through whichever adapter the routing table picks. Confluo pins each connection to its own adapter, so the networks carry the same file together; the faster one takes the larger share, and if one drops, the others take over its part.

The Confluo window during a download: the list on the left, the file map and live flow on the right
the window, dark
The same window in the light theme
the same, light
  • Uses every network at once. Ethernet, Wi-Fi and a hotspot each carry their own connections into one file.
  • Adds connections only when they help. It starts with 8, measures, and goes to 16 or 32 only if the speed follows.
  • Carries on after a crash. Twice a second it records which bytes are safely on disk; after a kill, exactly those are kept.
  • Says what is slow: the network path, a server capping each connection, a server refusing connections, a server that cannot resume, the disk, or your own limit. One cause, named.
  • Takes downloads from the browser. A Manifest V3 extension for Chrome, Edge and Firefox hands them to the app over loopback, with a pairing code that never leaves the PC.
Live flow: each network is a thread running into one stream, with total, average and peak speed and a 60-second chart
live flow: each network is a thread running into one stream
Architecture

From a link to a byte-exact file

architecture · diagram
 browser ext (MV3)        Confluo app (Tauri 2 + SolidJS window)
 ┌──────────────┐ signed  ┌───────────────────────────────────────────────┐
 │ offer + HMAC │ ──────▶ │ confluo-bridge  127.0.0.1 only, Origin/Host   │
 └──────────────┘ loopback│        │ checked, pairing code never sent     │
                          │        ▼                                      │
 link / mirrors ───────▶  │ confluo-engine                                │
                          │   probe ── whole-file GET, first data stream  │
                          │   scheduler ── ranges by measured speed       │
                          │   tuner ── 8 → 16 → 32 while +10% holds       │
                          │      │                                        │
                          │      ▼  confluo-net: sockets pinned per NIC   │
                          │   ┌ Ethernet ─┐ ┌ Wi-Fi ─┐ ┌ hotspot ─┐        │
                          │   └─────┬─────┘ └───┬────┘ └────┬─────┘        │
                          │         └─────▶ one writer ◀────┘              │
                          │                 bounded queue, one handle     │
                          │                 journal: flush, then swap     │
                          └───────────────────────────────────────────────┘
  • confluo-netFinds the interfaces, opens sockets pinned to one of them, and listens for changes. Windows pushes interface changes; elsewhere they are polled each second.
  • probeAsks for the whole file. Its response tells whether ranges work and how long the file is, and then simply becomes the first data stream instead of being thrown away.
  • schedulerGives each connection a lease on a share of the remaining bytes in proportion to its measured speed. A connection that finishes early takes over the tail of the slowest one.
  • tunerStarts at 8 connections, waits for the speed to level off, and adds more only while that buys at least 10%. It gives connections back when they bought nothing and holds still under your speed limit.
  • writer + journalOne thread, one file handle, a bounded queue. Twice a second the file is flushed, then the list of completed byte ranges is replaced atomically.
  • confluo-bridgeThe loopback service the browser extension talks to. It answers only a paired extension and refuses web origins and rebinding.
  • confluo-cliThe same engine without a window: confluo get <link> -i "Ethernet" -i "Wi-Fi". Ctrl-C pauses; the same command again continues.
  • confluo-testsrvA file server that misbehaves on purpose: per-connection caps, drops, stalls, no ranges, no length, HTTP 429, expiring signed links. Every engine test downloads from it.
Stack

Rust engine, small shell

Engine
Rust in five crates (net, engine, bridge, cli, testsrv), about 9.7k lines with the app. Raw socket options per OS: IP_UNICAST_IF on Windows, SO_BINDTODEVICE on Linux, IP_BOUND_IF on macOS.
App
Tauri 2 with a SolidJS window, Geist and Geist Mono, light and dark. The system WebView keeps the installer at 2.6 MiB.
Extension
Manifest V3 for Chrome, Edge and Firefox; offers signed with HMAC-SHA256 and a timestamp.
Disk
Space reserved without zero-filling (sparse on NTFS, fallocate on Linux); files replaced with a retry for up to two seconds when another program holds them open.
Secrets
Cookies and credentials sealed with Windows DPAPI; not saved at all on other systems.
Site
A download page in English and Vietnamese and a PowerShell one-liner (irm https://confluo.nhaajt.com/install.ps1 | iex) that checks the installer's SHA-256.
CI
GitHub Actions: rustfmt, clippy with -D warnings and the engine's tests on Windows, Linux and macOS (plus a release-mode stress test); the app typechecked, linted and built into an installer on Windows.
Design decisions

Choices, and what they cost

Pin to the interface, not the address

Binding only the source address leaves the routing table in charge, so with two default routes everything can leave through one adapter. A pinned connection to an adapter with no route fails with “network unreachable” instead of quietly going out another way.

Trade-off: per-OS raw socket options, and DNS still comes from the system resolver, not each interface's own.
Few long requests

Every new range request restarts TCP slow start, and some servers count requests: one public mirror answered HTTP 429 to an earlier design that used many medium-sized ranges.

Trade-off: ranges must be split and stolen at run time instead of planned up front.
Measure the connection count

8, 16 or 32 is decided by the speed it buys, not assumed. A refused connection says little about where the limit is, so the ceiling is tested again with one extra connection a second later, doubling the wait up to a minute.

Trade-off: on one shared bottleneck it spends about 0.14 s finding out that 16 connections do no more than 8.
No HTTP/2

HTTP/2 multiplexes everything over one TCP connection, which defeats both per-interface routing and parallel flows.

Trade-off: more TCP handshakes per download.
Rust and Tauri, not Electron

Interface pinning needs raw socket options, and the measured cost of an Electron main-process engine was 12.8–60.1 s of CPU per download against 0.1–1.7 s for this engine.

Trade-off: the window is a WebView, so the whole app tree still peaks at 358–395 MiB.
Honest about limits

If two interfaces share one router, the app says adding them up cannot help. With a VPN active, automatic mode leaves routing to the system so traffic does not go around the VPN.

Trade-off: it sometimes tells you it cannot go faster.
Hard problems

The parts that fought back

  • A stuck connection must not hold the end of the file. A connection reports its speed at least twice a second. One that reports nothing for two seconds, or would need more than five seconds for a small remainder, has the rest of its range handed to a faster connection.
  • The journal must never claim bytes that are not on disk. Flush first, then atomically replace the list of completed ranges. A soak test of 12 random interruptions (11 hard kills, 1 server kill) re-fetched about 19 MiB per kill and left a file with the undisturbed SHA-256.
  • A slow disk must not fill memory. One writer, a bounded queue: a slow disk slows the sockets instead. The tuner also lowers its ceiling when the disk falls behind.
  • Losing to a rival by 11–21% when servers set limits. The fix was a meter that no longer lagged a tick behind, accepting a jump of 60% or more a quarter of a second after it shows, a new connection for every lease worth splitting, and retesting a refused ceiling after one second instead of fifteen. All three rows became 2% wins.
  • A download that finished but never said so. One benchmark run never completed. The cause that fits: on Windows the saved list could not be replaced while another program had it open (the harness read it every 20 ms), and the failure was ignored. Replacing a file now retries for two seconds, with a test that holds the file open. It could not be reproduced, so it is not claimed as the cause.
  • The server sees 38 connections when Confluo runs 32. A connection whose tail was handed to another is closed mid-response and the server notices a little later. Documented rather than hidden.
Benchmarks

Measured, with the losses

Windows 11, i9-14900KS, 32 GB. Both apps download from confluo-testsrv on the machine's LAN address, 7 runs each; the other downloader is an open-source Electron app built from source and driven through its real window with Playwright. Seconds, median.

No limit, 1 GiB
1.70 vs 6.36: Confluo 3.7× faster
1 MiB/s per connection
7.32 vs 7.48: Confluo 2% faster
4 connections allowed
25.54 vs 26.11: Confluo 2% faster
No Range support
5.18 vs 5.29: Confluo 2% faster
150 ms first byte
3.72 vs 3.62: no difference shown (means equal)
One 20 MiB/s bottleneck
10.30 vs 10.16: the other is 1.4% faster
Hard kill at 50%
both files intact; Confluo re-fetched 6–16 MiB, the other 112–113 MiB
Requests, 200 MiB
1–83 vs about 200

Not claimed: the real gain from two internet connections (this machine has one uplink; emulated links reached 83–95% of their sum), runs longer than five minutes, files over 8 GiB, and public-internet speed, where one mirror varied from 3.4 to 11.9 s for the same file with plain curl.

Security and privacy

Nothing writes outside the folder

  • The window is boxed in. It can call a fixed set of commands and names downloads by id; it never passes a file path to open or delete. No remote code in the content-security policy.
  • Hostile file names. Server-supplied names lose path separators, reserved Windows names and invisible characters that reorder text, so ..\..\ and exe.pdf tricks do not survive.
  • Credentials stay with their origin: never sent to another host or port after a redirect, never from HTTPS down to HTTP. A redirect from a public site to this computer or a private address is refused.
  • The bridge listens on 127.0.0.1 only and refuses a web Origin or a wrong Host (DNS rebinding). The extension checks that the listener can sign a random number with the pairing code before trusting it, then signs each offer with a timestamp.
  • Saved state is distrusted. The list is written whole and flushed before it replaces the old one; on load, limits are clamped, an unreadable list is set aside, and a path is only opened or deleted inside the download's own folder.
  • What can reach what: the extension reaches the app over loopback with a signed offer; the app reaches only the hosts of links you gave; nothing reaches the app from the network.
Testing

Real downloads, compared byte for byte

  • 74 tests on Windows (73 elsewhere), plus a slow one that downloads 4.2 GiB and compares every byte. Scheduler and range-set invariants are property-tested.
  • Covered: servers without ranges or length, drops, stalls, refusals, 429, caps, a full outage, fourteen pauses in two seconds, a kill without warning, a file changing on the server, an expiring signed link, a wrong mirror, unequal and dead routes, a route removed mid-download, eighteen downloads at once, and the bridge refusing unpaired, web-page, rebinding, forged, replayed and altered requests.
  • The extension in real browsers: Chromium 156 and Firefox 160 with the real app, ten steps each, all passing.
  • The installer: silent install, a 300 MiB download with a matching SHA-256, the list surviving a restart, silent uninstall that leaves nothing behind. The install command refused an installer with one byte appended.
Limits

What it doesn’t do

  • No torrents, Usenet, Telegram, FTP or proxies.
  • macOS and Linux are checked by automated tests only; the desktop app is built for Windows.
  • The installer is not code-signed yet, so SmartScreen asks first. The extension is loaded unpacked, not from a store.
  • The resume journal is not authenticated: someone who can already write to your download folder could mark bytes as done. A checksum, when there is one, still catches it.
  • Nothing can make two interfaces behind the same router faster than one.