Note: this program is no longer necessary with the modern PIA app, but I'm leaving this project up in case it's still useful to someone.
Every time the PIA VPN starts, it deploys some Ruby files to a random temp directory and then launches those. The random path prevents it from being whitelisted by firewalls. This program helps to run PIA from a fixed location so it can be whitelisted in firewalls.
- Start PIA as usual so it can deploy its files to a random temp directory.
- Find this directory. It seems to match the pattern
%USERPROFILE%\AppData\Local\Temp\ocr*.tmp
and should containbin
,lib
, andsrc
folders. - Copy the contents of this directory into a new directory called
pia_ruby_files
inside your PIA install folder (probably%PROGRAMFILES%\pia_manager
unless you changed it). So when you're done you should havepia_manager\pia_ruby_files\src
etc. - Rename the existing
pia_manager.exe
inside your PIA install folder to something likepia_manager.exe.backup
. - Build this project and copy the output
pia_manager.exe
into your PIA install folder. That should be it!
Calling this program with no arguments will have it first kill any existing PIA processes and then start up PIA using the fixed pia_ruby_files
location. If you had PIA set to automatically start with Windows before, that should continue to work - it will call pia_manager.exe
with no arguments and PIA should start up as usual, but from this fixed path.
If you call pia_manager.exe
with the --stop
argument, it will just kill any existing PIA processes. This may be useful for automation applications to give you a way to start/stop PIA at will.