Here is a sample compose file I am using to run this. These settings allow tunnel access and also auto restart the container since these changes cause the container to exit if the VPN becomes unresponsive or the client crashes:
[info] PIA Port forwarding configured, calling pia_port_forwarding.sh
Starting script
getting token
6b6d303509d68b8f11c8a77dc72ad58581c48900f7aea5ed52d58a18504de6aaa9d006a19d61d7e666a96136f4f71a7b9eff0eb343da8e839cce9b0330de273ef
done getting token
starting port forwarding check
Tue May 25 09:37:22 MDT 2021: Getting PF token
Tue May 25 09:37:22 MDT 2021: Obtained PF token. Expires at 2021-07-27T03:38:33.079193308Z
Tue May 25 09:37:23 MDT 2021: Server accepted PF bind
Tue May 25 09:37:23 MDT 2021: Forwarding on port 36290
Current Port: 32761
pia-port: Current port forward: 32761
pia-port: New port number (36290) inserted into config file /config/qBittorrent/config/qBittorrent.conf.
Logging to /config/qBittorrent/data/logs/qbittorrent-daemon.log.
2021-05-25 09:37:31.520319 [info] Started qBittorrent daemon successfully...
Tue May 25 09:37:31 MDT 2021: Rebind interval: 900 seconds
Addresses Issues #60 and #88
Sample Compose.yml
Here is a sample compose file I am using to run this. These settings allow tunnel access and also auto restart the container since these changes cause the container to exit if the VPN becomes unresponsive or the client crashes:
New environment variable is
PIA_PORT_FORWARD
that handles port forwarding on PIA servers that have this feature enabled.Sample output