README.md
XRatio
A native control plane for tracker announce interception and controlled torrent simulation.
XRatio is a Windows-first .NET 10 / Avalonia desktop application for people who need a clear, local view of tracker announces. It brings two deliberately separate workflows into one compact tool:
- Interception — a local HTTP/HTTPS proxy inspired by RatioGhost sits between your torrent client and the tracker, changes the upload/download values sent in announces so the reported ratio can stay flat or increase, and leaves files and peer traffic untouched.
- Simulation — a standalone engine inspired by RatioMaster.NET reads a
.torrentfile and sends controlled tracker announces with your chosen client profile, upload/download speeds, progress, and counters; it does not transfer the real torrent files.
Download the latest Windows build · Lire la documentation en français
Windows-first · Avalonia · .NET 10 · GPL-3.0
Install and configure a torrent client
Install XRatio
- Download
XRatio.exedirectly from Releases. - Start
XRatio.exe; it is self-contained and does not require extraction or a separate .NET installation. - Confirm that the header shows the local proxy on
127.0.0.1:3773. - Keep simulations stopped unless you intentionally want to run a separate controlled torrent session.
Configure qBittorrent
The same settings are available in most clients that support an HTTP proxy. Stop active torrents before changing them.
- Open Tools > Options > Connection > Proxy Server.
- Choose HTTP, set the host to
127.0.0.1and the port to3773. - Enable Use proxy for BitTorrent purposes and Perform hostname lookup via proxy.
- Leave Use proxy for peer connections disabled. XRatio handles tracker announces only; payload and peer traffic stay on the normal client path.
- Apply the settings, then start or manually update a torrent announce.
- Use Interception and Activity in XRatio to confirm the announce and its counters.
For HTTPS trackers, open Platform in XRatio and explicitly trust the installation CA before enabling HTTPS interception. HTTP interception works without this step.
Example qBittorrent configuration:
Product surface
| View | What it is for |
|---|---|
| Overview | See whether the proxy is running, how many torrents are tracked, how many simulations are active, and how much upload is reported. |
| Interception | Compare original and reported upload/download, ratio, peers, status, and last announce for each torrent. |
| Simulation | Load a .torrent, choose a tracker and client profile, set speeds and progress, optionally choose Timer (minutes) under Stop, then send controlled announces without transferring files. |
| Activity | Read proxy and simulation events as they happen. |
| Settings | Change language, theme, tray icon, ratio rules, logging, autostart, and update checks. |
| Platform | Enable startup/tray behavior and trust or remove the local CA for HTTPS tracker interception. |
Design principles
- One control plane, two paths. Interception and simulation remain visibly separate so a real client session is never confused with an independent simulation.
- Local and explicit. The proxy is bound locally by default (
127.0.0.1:3773), and HTTPS trust requires a deliberate confirmation. - Fail closed. Direct tracker simulation keeps the operating system's TLS validation; XRatio does not copy the legacy accept-all certificate behavior.
- Observable by default. Counters, statuses, activity, and validation messages stay close to the action that produced them.
Download and run
End users should use the packaged Windows build from Releases. The self-contained package does not require a separate .NET installation.
On Windows, XRatio checks the official release at startup. When a newer packaged build is available, it downloads XRatio.exe and its published SHA-256, verifies both, closes XRatio, replaces the running executable, removes the previous executable, and starts the new version. Settings in %APPDATA%\XRatio are kept. If the current process is a development launch, the automatic replacement is disabled and the release page remains available.
When running from source, the desktop app starts with:
| 1 | dotnet run --project .\src\XRatio.Desktop\XRatio.Desktop.csproj |
The first launch keeps simulations stopped. Configured sessions are stored in %APPDATA%\XRatio\simulations.json; the proxy password is never persisted.
Build, test, and package
Prerequisite: .NET SDK 10.0.302.
| 1 | dotnet restore .\XRatio.slnx |
| 2 | dotnet build .\XRatio.slnx -c Release --disable-build-servers -m:1 |
| 3 | dotnet test .\XRatio.slnx -c Release --disable-build-servers -m:1 |
Create and smoke-test the self-contained Windows package:
| 1 | .\scripts\package-win-x64.ps1 |
| 2 | .\scripts\smoke-win-x64.ps1 |
Tagged Windows releases are Authenticode-signed in CI when the repository provides the XRATIO_CODESIGN_PFX_BASE64 and XRATIO_CODESIGN_PFX_PASSWORD secrets; the release job refuses a tagged build without them. For a local package, pass an approved code-signing certificate to scripts\package-win-x64.ps1 with -SigningPfxPath and -SigningPfxPassword.
Installed-qBittorrent smoke tests are opt-in. Enable them only when an isolated qBittorrent launch is acceptable:
| 1 | $env:XRATIO_RUN_QBITTORRENT_SMOKE='1' |
| 2 | dotnet test .\tests-dotnet\XRatio.Desktop.Tests\XRatio.Desktop.Tests.csproj -c Release |
Repository layout
| 1 | src/XRatio.Core shared announce, torrent, simulation, and settings logic |
| 2 | src/XRatio.Proxy local HTTP/HTTPS proxy and redacted activity logging |
| 3 | src/XRatio.Desktop Avalonia desktop shell, tray, themes, localization, and platform trust |
| 4 | tests-dotnet Core, Proxy, and Desktop test suites |
| 5 | scripts Windows packaging and smoke-test entry points |
Responsible use
Trackers can prohibit modified or simulated statistics. Use XRatio only with services and torrents for which you are authorized, and follow the tracker rules and applicable law. XRatio handles tracker announces only; it is not a peer-to-peer client and does not process payload traffic.
Inspiration and provenance
This repository was developed with OpenAI Codex.
XRatio is an independent .NET 10/Avalonia implementation inspired by two existing projects:
- RatioGhost — inspiration for the announce/proxy workflow, local platform integration, certificates, tray behavior, packaging, and verification boundaries.
- RatioMaster.NET — inspiration for the
.torrentsimulation workflow, tracker sessions, client profiles, counters, speed variation, and announce lifecycle.
The complete attribution is available in THIRD_PARTY_NOTICES.md.
License
XRatio is distributed under the GNU GPL v3. Third-party attributions are listed in THIRD_PARTY_NOTICES.md.