Script to get new IP addresses in JDownloader by reconnecting Private Internet Access.
- Go to Settings -> Reconnect
- Tick all three checkboxes.
- Set method to
External Batch Reconnect
- Set interpreter to
cmd /c
- Set script to
piactl.exe background enable
timeout 3
piactl.exe disconnect
piactl.exe connect
- Set application folder to
C:\Program Files\Private Internet Access
- Go to Settings -> Reconnect
- Tick all three checkboxes.
- Set method to
External Batch Reconnect
- Set interpreter to
/bin/bash -c
- Set script to
./piactl background enable
./piactl disconnect
./piactl connect
- Set application folder to
/usr/local/bin
Thought I'd add to this as I needed new IP address/location to download multiple files and simply reconnecting to the same VPN location didn't rotate my IP address;
This script creates a temporary text file in root of the c drive (due to permissions needed to write it in the PIA folder) that outputs all the locations available to use, it then reads one of the locations randomly and connects you to one.
HOWEVER, when I tried to do this with Jdownloaders 'External Batch Reconnect' option it failed even though when running it as a batch script it works, for some reason it fails to use a random location and reconnects to the same location each time, so instead I copied the above into a bat file inside the PAI folder called 'random' and use Jdownloaders 'External Tool Reconnect' and then select the batch file in the PIA folder and it works! Annoyingly it does run the batch over the top of windows but I use this script on a headless box so it's no issue for me.