From 2c3300b8b07ea29c94306ac49822959b5a7b20b8 Mon Sep 17 00:00:00 2001
From: lrnselfreliance <33263708+lrnselfreliance@users.noreply.github.com>
Date: Sat, 28 Nov 2026 14:25:24 -0700
Subject: [PATCH] Torrents over a fail-closed VPN (#1026)
Torrents reach the Internet only through a fail-closed VPN (WireGuard or
OpenVPN, any provider), so peers never see a WROLPi's own address.
- A network namespace (Pi/Debian) or the vpn container (Docker) with an
nftables kill switch; NAT-PMP or fixed port forwarding.
- qBittorrent inside it, sandboxed; torrents kept in config/torrents/.
- Torrent download form, Torrents page, Share as torrent, nav warning, and
VPN settings in both Controller UIs.
- Help docs: Torrents, and The VPN for Torrents.
QA'd on a Raspberry Pi with a real provider over WireGuard and OpenVPN.
Co-Authored-By: Claude Opus 5.5
The total for all torrents, in KiB/s. 0 is unlimited. Limit uploads to keep this network usable while + seeding.
+Stop seeding once either is reached. Leave empty to seed forever.
+Stop downloading and seeding this torrent. Its files stay in the library unless you choose otherwise.
+
+ VPN:
+ {/* qBittorrent's own connection flag is not the VPN: peers reach it only through a connected VPN. */} + {vpnConnected && connectionText(status.connection_status)} + {vpnConnected && connectionText(status.connection_status) && ' · '} + ▲ {humanBandwidth(status.upload_speed || 0)} ▼ {humanBandwidth(status.download_speed || 0)} + {' · '}Limits: ▲ {limits.upload ? `${limits.upload} KiB/s` : 'unlimited'} + {' '}▼ {limits.download ? `${limits.download} KiB/s` : 'unlimited'} +
} +The torrents cannot be shown while qBittorrent is not running.
+ : torrents.length === 0 + ?No torrents yet. Add one from the Download menu.
+ :+ Torrents only use this VPN, so peers never see this WROLPi's own address. When the VPN is down, + torrents stop; they never fall back to this WROLPi's own Internet connection. +
+ + {status &&
+
+ {hasConfig + ? <>Config: {kindLabels[settings.kind]} to {settings.servers.join(', ')}> + : 'Upload the WireGuard (.conf) or OpenVPN (.ovpn) file from your VPN provider.'} +
+ +This OpenVPN config needs your VPN login{settings.has_auth ? ' (saved)' : ''}.
++ Torrents only use this VPN, so peers never see this WROLPi's own address. When the VPN is down, torrents + stop; they never fall back to this WROLPi's own Internet connection. +
+Loading...
+ + + + + +