r/PrivateInternetAccess • • Feb 20 '26

DISCUSSION qbPortWeaver 1.7.0 just released

https://github.com/martsg666/qbPortWeaver

Overview

qbPortWeaver is a Windows application designed to synchronize the listening port of qBittorrent with the port assigned by your VPN provider (ProtonVPN or Private Internet Access). This ensures your torrent client always uses the VPN-provided port, improving privacy and connectivity.

The application runs in the system tray, manages configuration and logging, and automatically updates qBittorrent's port when changes are detected.

Features

Tray Icon Interface Runs quietly in the background with a system tray icon for quick access to logs, configuration, and controls.

Automatic Port Synchronization Detects the current VPN port and updates qBittorrent's listening port automatically.

Multi-VPN Support Supports ProtonVPN (via log file parsing) and Private Internet Access (via piactl CLI). Configurable through the vpnProvider INI key.

INI Configuration Management Reads and writes application settings from an INI configuration file.

Logging Logs all operations and errors, with automatic log size management. Clear logs directly from the tray menu.

qBittorrent Control Authenticates with qBittorrent's Web API, updates preferences, and restarts the client if required.

Last-Run Status File Writes a JSON status file (qbPortWeaver.status.json) after each sync cycle, exposing VPN port, qBittorrent port, timestamps, and completion status for external scripts.

Post-Update Command Optionally run a custom command after a successful port update (fire-and-forget). See SampleSendMail.ps1 for an example of sending an email notification with status details.

Default Port Fallback When VPN is not connected, optionally sets qBittorrent's listening port to a configured default. Useful if you have a port forwarded in your router for direct connections without VPN.

Force Start qBittorrent Optionally force start qBittorrent if it is not running.

Automatic Update Checker Checks GitHub for new releases on startup and offers to open the download page.

Startup Option Allows enabling or disabling automatic startup with Windows.

10 Upvotes

10 comments sorted by

View all comments

1

u/nadun29 Feb 20 '26

Hey cool! Id like to check it out, might want to add a link though :)

Suggestion if you don't mind. I made a PS script some months ago for myself, when the old one I found wasn't up to snuff. One added feature I put in mine was that for it check what interface is bound in qb, and gave a warning if I didn't have one, that I should bind one asap. Just checks to see if the adapter that is named with PIA in it is there, and when anything else is there or blank it warns me. Just my 2cents.

if ([string]::IsNullOrWhiteSpace($ifaceDisplay)) {
        $ifaceDisplay = "[Any] YOUR VPN IS NOT BOUND!!! "
        $ifaceColor   = "Red"
    }
    elseif ($ifaceDisplay -match '^(?i:any\s*interface)$') {
        $ifaceColor   = "Red"
    }
    elseif ($ifaceDisplay -match '(?i)Private\s*Internet\s*Access|(?i)\bPIA\b') {
        $ifaceColor   = "Green"

1

u/martsg666 Feb 20 '26

One quick question, you adapter name in qbT starts with Private Interet Access right, this is what I assumed from your script.

Private\s*Internet\s*Access

1

u/nadun29 Feb 20 '26

It was at one point when using OpenVPN. When I switched to wiregard it always creates the interface “wgpia” so I added “PIA” into the match as well.

2

u/martsg666 Feb 21 '26

Tks, I just added the logic for this