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 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-11-28 14:25:24 -07:00 • committed by Roland
parent 633b125dc6
commit 2c3300b8b0
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
80 changed files with 7516 additions and 45 deletions

View file

@ -93,10 +93,10 @@ class TestConfig:
["rsync", "--version"], capture_output=True).stdout, reason="needs rsync 3")
def test_daemon_serves_the_library_read_only(tmp_path):
"""The daemon run with the real config (only its port and path changed) lists the library, never serves the
database in use or the TLS keys, serves the snapshot, and refuses a write."""
database in use, the TLS keys or the VPN keys, serves the snapshot, and refuses a write."""
media = tmp_path / "media"
for path in ("videos/a.mp4", "config/tags.yaml", "config/wrolpi.db", "config/wrolpi.db-wal",
"config/ssl/ca.key", "config/cookies.txt.enc", "config/.sync/config/wrolpi.db",
"config/ssl/ca.key", "config/vpn/wireguard.conf", "config/cookies.txt.enc", "config/.sync/config/wrolpi.db",
"config/.sync/config/.wrolpi.db.backup"):
(media / path).parent.mkdir(parents=True, exist_ok=True)
(media / path).write_text(path)