Created
June 24, 2025 15:02
-
-
Save coolreader18/6d5c4b70d0d0ebc9a97fbd866ff578df to your computer and use it in GitHub Desktop.
Set the qBittorent incoming port to the port forwarded by PIA VPN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Uri = "http://localhost:6969" | |
$piactl = 'C:\Program Files\Private Internet Access\piactl.exe' | |
& $piactl monitor portforward | ForEach-Object { | |
try { | |
$Port = [int]$_ | |
} catch { | |
return | |
} | |
$Body = @{ json = ConvertTo-Json @{ listen_port = $Port } } | |
Invoke-WebRequest -Uri "$Uri/api/v2/app/setPreferences" -Method Post -Body $Body | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment