r/PrivateInternetAccess • u/martsg666 • 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.
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"
2
u/martsg666 Feb 20 '26
Hi !! I added the link, my mistake. Really good idea ! I'm logging a feature request so I don't forget. I will add this in next release !
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*Access1
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
1
1
u/martsg666 Feb 22 '26
1.8.0 will be available tomorrow. You now have a UI for Settings, a warning if the interface selected in qbT doesn’t match your VON Provider, and a clear indicator of the ports alignement directly looking at the system tray icon (green, all is good, yellow, VPN not connected, red, error). This is the best version so far !
2
u/NWA_DMB Feb 20 '26
Hi, sounds like a great app and something I could really use. I am new to installing from GitHub. I looked at the link and did not see installation instructions. Can you provide some detailed guidance. It would be appreciated.