Skip to content
HarshsanketPublic

About

A native macOS client for the qBittorrent Web API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Drift

Drift — a native macOS client for the qBittorrent Web API.
Your server keeps doing the work; Drift makes it feel like a Mac app.

Status: Beta Version 1.1.0

Screenshots

Torrent list + details Feature cards in Settings Connection Booster
Torrent list and details panel Feature cards Booster downloads

(More screenshots live in screenshots/.)

What is Drift?

Drift is a lightweight, native macOS BitTorrent client built with Swift 6, SwiftUI and Apple's native frameworks, powered by the qBittorrent Web API. The transfers themselves always run in qBittorrent — on your Mac, a home server, or a seedbox — and Drift is the efficient native frontend that talks to it. An optional WireGuard tunnel covers Drift's own traffic.

Status: beta (v1.1.0). It is in active development; expect rough edges and please report anything odd via Issues.

Features

  • Torrent list — live status sidebar (All, Downloading, Seeding, Completed, Stopped, Queued, Stalled, Error) with counts, plus name, status, progress, size and per-torrent speeds; text filter box.
  • Details dock — General, Trackers, Peers, Sources and Files tabs in a collapsible bottom dock, with the selected torrent's piece map in the status bar; per-file download priorities; add/edit/remove trackers and web seeds, reannounce; quick Boost, Remove, Delete Files and Finder actions.
  • Manage torrents — start / stop / force start / recheck / queue to top, up, down, bottom; rename; remove (optionally delete files).
  • Add via magnet link, URL or .torrent file (drag & drop; large file guard), with a configurable default save destination.
  • Categories and tags to keep a large library tidy.
  • Speed control — set global and alternative speed limits straight on the server from Settings.
  • WireGuard tunnel — optional per-app tunnel powered by Partout through a privileged helper: only Drift's own URL sessions use it, the host keeps its normal routes and DNS, and a kill switch blocks egress while the tunnel is down. Paste a WireGuard .conf in Settings.
  • Peer Protection — qBEE-style anti-leech: flags known leecher clients (Xunlei, Thunder, QQ, Baidu, Xfplay, DLBT, offline downloaders…), media players parked in the swarm, peers that connect but never move data (configurable timeout), and unknown clients from flagged regions. Runs in three modes — Off, Shadow (log only) and Auto-ban — with a client/IP whitelist and a log of recent decisions; bans go straight to the server's banned_IPs list.
  • Connection Booster — accelerates downloading torrents that expose HTTP web seeds: Drift pauses the torrent, fetches missing pieces over parallel ranged HTTP, verifies each piece against the torrent's SHA-1, writes the files and resumes qBittorrent. Boost tasks and legacy direct downloads live in the Downloads window.
  • Search — qBittorrent's plugin search in a full detail pane with plugin management: install, enable/disable, update or remove plugins; watch results stream in, stop or delete a run, and grab results.
  • RSS — subscribe to RSS feeds from qBittorrent, read article lists, refresh, mark read, and grab items as downloads.
  • Statistics pane, dock badge for active downloads, and notifications when a download completes.
  • Menu bar status item with quick peek and controls, optional.
  • Power conscious — adaptive tiered sync (0.35–1.2 s) that speeds up while transfers are active and slows down when idle, keeps the app at ~0 % CPU when the window is hidden, and an optional "prevent idle sleep while transfers are active" toggle.
  • Appearances — System, Light and Dark themes.
  • Automatic update check (GitHub releases) on launch plus a manual "Check for Updates" button.

How it works

  • DriftApp sets up the scenes (main window, Settings window, Downloads window, menu bar item) and keeps one shared model.
  • ListViewModel (@MainActor, observable) orchestrates everything: connection lifecycle, sync tiers, sidebar statistics, details caches, search and RSS state.
  • WebAPIEngine is a dependency-free URLSession client for the qBittorrent Web API (API 2.x): session-cookie login, form-encoded actions, and a delta-based sync loop (sync/maindata + per-section sync) that adapts its polling interval to activity.
  • LeechGuard runs peer reviews against every detail refresh and routes ban decisions to the server; Booster (DownloadCenter) plans and races parallel ranged piece fetches for torrents with HTTP web seeds, with persisted progress for direct downloads.
  • TunnelService drives drift-tunnel-helper, a root daemon that owns the utun and exposes a loopback-only relay; Partout handles WireGuard, and only Drift's URLs are proxied.
  • The password and WireGuard profile are stored securely in the macOS keychain.
  • UpdateChecker polls the repository's GitHub releases; Sparkle-backed UpdateService verifies EdDSA signatures when an appcast feed is configured.

Third-party packages

Both dependencies are pinned exactly in Package.swift for reproducible release builds and refreshed with swift package update.

  • Partout (GPL-3.0) — the WireGuard tunnel core and the prebuilt PartoutNative framework used by the app and its privileged helper.
  • Sparkle (MIT) — EdDSA update verification and installation. The SwiftUI update surfaces drive the user decision; Sparkle performs the signed swap.

The Drift app itself uses Foundation, SwiftUI, AppKit, URLSession and the two packages above.

Requirements

  • macOS 26 (Tahoe) or later, Apple Silicon (ARM64)
  • A qBittorrent instance with its Web UI enabled and search plugins installed for search (Drift can install and manage them from Settings) (tested against qBittorrent 5.2.4; Web API v2.15.1 reported by the server — Drift also tolerates older/newer API leanings)
  • For the optional tunnel: a WireGuard profile and admin approval to start the privileged helper

How to make it work

1. Enable the qBittorrent Web UI

In qBittorrent: Tools → Options → Web UI → enable "Web User Interface (Remote control)", pick a port (e.g. 8080) and set a username/password.

2. Connect Drift

Open Drift → Settings → enter the Web UI URL (http://<host>:<port>), username and password → Test Connection → Save. The password is kept in your keychain.

3. Or grab a release build

Drift-1.1.0-arm64.dmg (or the matching .zip) from the Releases page, drag to Applications, and launch (right-click → Open the first time so the ad-hoc developer build is allowed).

4. Build from source

git clone https://github.com/Harshsanket/drift
cd drift
swift build --arch arm64
./Scripts/package-dev-app.sh        # → .build/Drift.app
open .build/Drift.app

Run the unit suite with swift test --arch arm64.

Building needs a recent Xcode with the macOS 26 SDK and xcode-select pointing at it.

Languages used

  • Swift (SwiftUI, AppKit, Swift Concurrency) — the entire app
  • Swift Package Manager — build system and tests
  • Bash — dev packaging scripts

Thanks

  • Thank you to the qBittorrent engine and its contributors — Drift is the native face of their excellent work over the Web API.
  • Development was helped along by GLM 5.3.
  • Proudly made in Mumbai by Harsh Sanket.

a Harsh Sanket production

About

A native macOS client for the qBittorrent Web API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages