Skip to content
forked from hsand/pia-wg

A WireGuard configuration utility for Private Internet Access

License

Notifications You must be signed in to change notification settings

jauderho/pia-wg

 
 

pia-wg

A WireGuard configuration utility for Private Internet Access

This is a Python utility that generates WireGuard configuration files for the Private Internet Access VPN service. This allows you to take advantage of the WireGuard protocol without relying on PIA's proprietary client.

This was created by reverse engineering the manual-connections script released by PIA. At this stage, the tool is a quick and dirty attempt to get things working. It could break at any moment if PIA makes changes to their API.

pia-wg runs on both Windows and Linux.

Windows

  • Install the latest version of Python 3
    • Select "Add Python to environment variables"
  • Install WireGuard

Open a command prompt and navigate to the directory where you placed the pia-wg utility. The following commands will create a virtual Python environment, install the dependencies, and run the tool.

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python generate-config.py

Follow the prompts. When finished, you can exit the virtual environment with the deactivate command.

The script should generate a .conf file that can be imported into the WireGuard utility.

Linux (Debian/Ubuntu)

Install dependencies, clone pia-wg project, and create a virtual Python environment:

sudo apt install git python3-venv wireguard openresolv
git clone https://github.com/hsand/pia-wg.git
cd pia-wg
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run the tool, and follow the prompts

python3 generate-config.py

Copy the .conf file to /etc/wireguard/, and start the interface

sudo cp PIA-Iceland-1605054556.conf /etc/wireguard/wg0.conf
sudo wg-quick up wg0

You can shut down the interface with sudo wg-quick down wg0

Check everything is working

Visit https://dnsleaktest.com/ to see your new IP and check for DNS leaks.

About

A WireGuard configuration utility for Private Internet Access

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.4%
  • Dockerfile 20.8%
  • Shell 2.8%