TorBox proxy
Stable local URLs that never expire. It refreshes short-lived CDN links per request and caches mylist to stay fast.
Jellyfin library + TorBox cloud + PotPlayer playback, on Windows, with no transcoding. Cloud torrents mount as local drives, Jellyfin keeps metadata, resume and Next-Up, and PotPlayer direct-streams full-season 4K through a local proxy. A loopback-only panel owns start/stop, health and Play-in-PotPlayer.
Six moving parts, one chain. Each one is a script or service in the repo, so you can read exactly what runs.
Stable local URLs that never expire. It refreshes short-lived CDN links per request and caches mylist to stay fast.
Jellyfin Play hands a potplayer:// link to Windows. The launcher picks the right file, refreshes stale cache and opens the full season at your resume point.
Posts progress every 5 s and marks Played at 80%, so Next-Up keeps working on every client.
A live tail of launcher and playback ticks, episode hints and 80% Played events.
Loopback-only Start / Stop / Restart, status, metrics and Play buttons. No console juggling.
Ordered start (mounts, proxy, bridge, Jellyfin, panel) plus a watchdog, mutex and PID files.
.strm sync
FULLCACHE=1 full-file prefetch
Full-season .dpl with /seek= resume
Nagios-style check_*.ps1 probes (-AsJson)
rclone MCP bridge
Prometheus /metrics on the proxy
This is the repo's own walkthrough of a single episode, from the panel to the progress bar and back to Jellyfin.
# the whole loop, in your browser
http://127.0.0.1:18080 # Start all
http://127.0.0.1:8096 # Jellyfin: Play-in-PotPlayerOpen the panel and click Start all. Mounts come first, then proxy :8888, bridge :18099, Jellyfin :8096 and the panel itself.
Metadata, posters and Next-Up come from TMDB plus the .strm scan.
A potplayer:// link is built and handed to Windows.
It maps the Jellyfin item to a .strm on T:\, refreshes a stale VFS through rclone RC :5572 if needed, and picks the TorBox CDN or the :8888 proxy fallback.
A full-season UTF-16 .dpl loads with your episode queued and /seek= set to your Jellyfin resume position.
Direct HTTP from :8888/torbox/... 302s to a fresh CDN URL, so 4K REMUX direct-streams with a full-cache seek bar.
Progress is POSTed every 5 s and the episode is marked Played at 80%. Pause in Jellyfin Web, resume in PotPlayer, and Next-Up advances.
Every play follows the same path. The proxy hides expiring CDN links behind stable loopback URLs; the sync tracker closes the loop back to Jellyfin.
Hides expiring CDN tokens behind stable loopback URLs. Only the short resolver result is cached; expiry becomes a redirect.
Exposes /health and /status and refuses to start unless the proxy is healthy. The supervisor and panel enforce the same gate.
Merges live process scans with proxy /metrics, and runs bulk Start / Restart in mount-first order with health waits. Stop reverses it.
Full service map, session model and boot order: ARCHITECTURE.md. Day-2 operations: RUNBOOK.md.
Service cards show a process match plus a real health probe, so a green badge maps to something that is actually running.
Illustrative mockups built from the repo docs, with demo values. The repo has no screenshots committed yet; its capture checklist lives in assets/screenshots/PLACEHOLDER.md. Panel cards and endpoints are documented in docs/panel.md.
For a fresh PC with the prerequisites already installed: PotPlayer x64, rclone + WinFsp, Python 3.11, Jellyfin 10.x files and a TorBox account. Pick one path.
git clone https://github.com/MHJoy99/jellyfin-torbox-potplayer-stack.git
cd jellyfin-torbox-potplayer-stack
pwsh -File install.ps1 -WhatIf
pwsh -File install.ps1install.ps1 prompts for TORBOX_API_KEY (masked), validates it with a live API call, initializes the F:\Jellyfin directory layout, registers the potplayer:// protocol handler and the MediaStackSupervisor scheduled task, starts the stack and runs port health probes (:8888, :18099, :18080, :8096). Switches (-WhatIf, -Uninstall, -SkipTasks, -Portable, -TorboxApiKey, -KeyScope) are in docs/install.md.
pwsh -File setup-wizard.ps1Step-by-step: masked key entry, library root folders, Jellyfin connection test, PotPlayer auto-detection, rclone configuration, port availability and playback mode, with a dry-run preview before anything is applied. Supports -Resume and -NonInteractive.
# Run component installers in dependency order:
pwsh -File install-all.ps1
# Perform one-time ordered service startup (mounts -> proxy -> bridge -> Jellyfin -> panel):
pwsh -File supervisor.ps1 -Mode StartFull dependency order and verification steps live in docs/install.md and docs/quickstart.md.
http://127.0.0.1:18080Click Start all, wait for green, open Jellyfin at http://127.0.0.1:8096, press Play-in-PotPlayer. The full-season playlist opens at your resume point.
# Persistent (survives reboot, read live by supervisor):
[Environment]::SetEnvironmentVariable("TORBOX_API_KEY", "<your-key>", "User")
$env:TORBOX_API_KEY = [Environment]::GetEnvironmentVariable("TORBOX_API_KEY", "User")
# Verify without leaking the key:
pwsh -File check_status.ps1 -AsJson; $LASTEXITCODE # expect 0
Invoke-RestMethod http://127.0.0.1:8888/healthNo tokens in files, no .env committed. Every service binds loopback only by default.
| Variable | Required | Default / use |
|---|---|---|
TORBOX_API_KEY | Yes | Empty: the proxy refuses to start. Re-read live from the Machine/User registry by the supervisor. |
JELLYFIN_URL | No | http://localhost:8096 |
JELLYFIN_USER / JELLYFIN_PASSWORD | For health checks | Used by check_status.ps1 and check_user_views.ps1; never logged. |
JELLYFIN_API_KEY | No | Automation: gdrive-library-sync.ps1 for POST /Library/Refresh. |
FULLCACHE | No | 0. Set 1 to prefetch the full file for a solid seek bar. |
RCLONE_EXE / RCLONE_CONFIG | No | For the rclone MCP bridge; the real config file is untracked. |
| Port | Service |
|---|---|
8888 | TorBox proxy: /health, /torbox/... 302 to fresh CDN, /mylist, /metrics |
18099 | PotPlayer bridge: /health, /status; health gate before every launch |
18080 | Control panel: status, metrics, playback buttons |
8096 | Jellyfin HTTP: web UI, /System/Info/Public, /Videos/{id}/stream |
5572 | rclone RC, TorBox mount (vfs/refresh, core/stats) |
5573 | rclone RC, Google Drive mount |
Defaults aimed at residential gigabit connections, taken from the repo's mount script and proxy.
--vfs-cache-mode full with a 25G cache cap, 12h max age and 30G min free space. Chunks start at 32M (fast first byte) and double to 256M with 128M read-ahead. Directory cache 15m. Keep the cache on an NVMe SSD.
Fresh CDN links by 302 with a token-bucket rate limiter, a shared mylist cache (10 minutes, singleflight coalescing) and HTTP/1.0 progressive streaming to avoid client hangs.
PotPlayer gets progressive HTTP straight from the proxy for instant seeking. Set $env:FULLCACHE = "1" before launch to cache the full file for ultra-high-bitrate REMUX.
From the repo's USECASES.md. Each plays only files they own or have the right to play.
Direct-play large files, instant seeking, no stutter on high bitrates and no forced transcoding.
Correct episode order, fast Next-Up and reliable subtitles, preserved on direct play.
Simple start and stop, green means go, and per-user resume and watched state.
Familiar instant links with your own catalog and history, and a proxy that keeps links fresh.
Observable services: Prometheus metrics, JSON health output, an allowlisted automation bridge, assert-based smoke tests.
Windows 10/11 x64, Jellyfin 10.x, PotPlayer x64, rclone VFS. Linux, macOS, Docker, Plex and Emby are out of scope.
From the repo's COMPARISON.md. Every option is good at something; this stack is tuned for direct-play control on a Windows home server with cloud-backed libraries.
| Capability | This stack | Plex | Emby | Plain Jellyfin | Infuse |
|---|---|---|---|---|---|
| License and cost | MIT, free, self-hosted | Freemium with paid tier | Freemium with paid Premiere | Free and open source | Paid app with free tier |
| Source availability | Fully open | Proprietary server | Proprietary with some open clients | Fully open | Proprietary |
| Setup effort | Manual, guided by installer and runbook | Guided, easiest for beginners | Guided, easy | Manual, moderate | Very easy on Apple devices |
| 4K remux direct-play | Tuned for it via external player and local proxy | Yes, depends on client and server settings | Yes, depends on client and server settings | Yes, depends on client | Excellent on Apple hardware |
| External player choice | Yes, first-class queue and resume | Limited, client dependent | Limited, client dependent | Browser and app clients, DLNA | Natively its own player |
| Cloud and debrid style libraries | Built-in mount plus sync workflow | Via add-ons and manual mounts | Via plugins and manual mounts | Via manual mounts and plugins | Via cloud integrations |
| Local proxy with metrics | Included with cache and Prometheus endpoint | Not included | Not included | Not included | Not included |
| Web control panel | Included local panel for status and playback | Hosted dashboard plus apps | Hosted dashboard plus apps | Built-in dashboard | Native app UI |
| Best fit | Tinkerers who want control and logs | Households wanting polished apps | Households wanting live TV and apps | Self-hosters wanting open basics | Apple-first viewers wanting polish |
No option wins everywhere. If another tool fits you better, that is a good outcome too (the repo's words).
VERSION is 1.0.0 with no newer tag cut. Work since then sits under [Unreleased] in the changelog. Items marked Planned are roadmap only; v1.1, v1.2 and v2.0 are planning milestones, not releases.
install.ps1docs/The README's older wish list also mentions Grafana dashboards and a Docker / Caddy / Cloudflared edge profile for remote access. Both are roadmap, not current.
Use responsibly. This project is neutral tooling that connects services you already use. Play only media you own or have the right to access, and respect the terms of service of TorBox, Jellyfin, TMDB and any other service you connect.
The panel and proxy bind to loopback and have no login by design. Do not expose them to your network without adding authentication and TLS. Keep your TorBox key in environment variables, never in files, issues or commits.
It mounts TorBox and Google Drive as local drives with rclone, serves fresh CDN URLs through a local proxy on port 8888, and launches PotPlayer with a full-season playlist at your exact resume point. Jellyfin keeps the library, metadata and watched state, while PotPlayer handles 4K direct-stream playback without transcoding or browser codec limits.
Store it only as a Windows environment variable named TORBOX_API_KEY at User or Machine scope, then restart the proxy and supervisor so child processes inherit it. Never paste the key into scripts, configs, issues or commits. The proxy refuses to start when the variable is empty, and rotation means updating the environment plus registry and restarting the services.
Jellyfin Web often remuxes or transcodes high-bitrate 4K REMUX files because of browser codec and subtitle limits, which costs CPU and adds buffering. PotPlayer direct-streams the original file over HTTP from the local TorBox proxy, so it seeks instantly with a full-cache bar and uses negligible server CPU while preserving the original video, audio and subtitle tracks.
A lightweight tracker posts the playback position to the Jellyfin Sessions Playing Progress endpoint every five seconds while PotPlayer runs. When you pass eighty percent, it marks the episode Played, so Next-Up advances and other clients resume correctly. You can verify it live in the watch console, show-playback-log.ps1.
Start the mounts before Jellyfin, because a scan that races a downed VFS indexes stub files and empty views. Verify the drive paths exist, refresh the rclone RC cache on ports 5572 and 5573, confirm proxy health on port 8888, then trigger a Jellyfin library refresh. The included check scripts return Nagios-style exit codes and JSON for fast automated checks.
Windows 10 or 11 x64 with PowerShell 7+, Jellyfin Server 10.x, PotPlayer x64 with the potplayer protocol registered, rclone with WinFsp and TorBox and Google Drive remotes, a TorBox API key, and Python 3.11 for the proxy, bridge and panel. Linux, macOS, Docker, Plex, Emby and remote hosting are not in scope. Google Drive sync is optional and TorBox is the primary cloud.
No. Both bind to localhost with no login by design, so anyone on the network could control playback or services. Do not expose them without adding authentication and TLS. A Caddy or Cloudflared edge profile for secure remote access is on the roadmap, not part of the current release.
Clone the repository and run pwsh -File install.ps1, using -WhatIf first to preview every planned action. The guided alternative is setup-wizard.ps1. To update, stop the stack, pull the latest branch, re-run the installer and re-run the health checks. To remove it, run install.ps1 with -Uninstall. The full lifecycle is in docs/install.md.
Yes. It is MIT licensed and free to use, modify and distribute, with no warranty. You need your own Jellyfin install, PotPlayer, rclone and a TorBox account. Use it responsibly: play only media you own or have the right to access, and respect the terms of service of TorBox, Jellyfin and any other service you connect. It is not affiliated with those projects.
See everything on the MHJoy99 GitHub profile.
Free, MIT licensed and open source. Star the repo, open an issue, or send a small focused PR.