Skip to content

Instantly share code, notes, and snippets.

@joshuag
joshuag / map_port.sh
Last active November 28, 2023 01:36
FreeBSD/Truenas Core Bash script to automatically map transmission peer port with PrivateInternetAccess
#!/usr/bin/env bash
# These three environment variables should be set, or you can hardcode them into this script
PIA_USER=$PIA_USER
PIA_PASS=$PIA_PASS
TRANSMISSION_HOST=$TRANSMISSION_HOST
generateTokenResponse=$(curl -s --location --request POST \
'https://www.privateinternetaccess.com/api/client/v2/token' \
--form "username=$PIA_USER" \

Keybase proof

I hereby claim:

  • I am joshuag on github.
  • I am joshuag (https://keybase.io/joshuag) on keybase.
  • I have a public key ASAo_JEHLNI14PpveSSSlDAExnbfnbVIwCIk75cUuLd0pQo

To claim this, I am signing this object: