How to setup linuxserver's Transmission on a VPN without using a different docker image with VPN support.
This guide assumes you have setup transmission already is only meant to get Mullvad VPN working with it.
Mullvad Account & Configuration
Generate an account with Mullvad VPN: https://mullvad.net/en/account/#/
Save the account number so you can access your account later on, you will not be able to recover this information later and there is no password.
Make sure you make a payment else you will not be able to create port forwarding or generate config files in the coming steps.
Generate config files: https://mullvad.net/en/account/#/wireguard-config/
Select Linux, Click Generate Key, Select Country/City/Server and download the file.
Unzip this file and save the files for later use.
Create Port Forward: https://mullvad.net/en/account/#/ports
Select the same city & key that you selected in step 2 and click Add Port.
In this example, the port that was randomly generated was '55214'. We'll need this for transmission incoming port.
You will not be able to select the port number to forward, a random one will be assigned to you!
Set a VPN User and Password (not sure this is really needed, but i set it anyway)
Set Provider to 'custom'
Set Client to 'wireguard'
Set ENABLE_PRIVOXY to 'yes'
Click on Add Another Path, Port, Var...
We need to add the port that was genreated during the Mullvad setup. In our example it is '55214'. We need to add two of these, one for UDP and TCP.
Now we need to add the port for the transmission web/gui interface, which is 9091.
And we are done with configuration, click apply/done and let it install and start.
Once Privoxyvpn started, its going to be complaining about not having a wireguard config (look at the log).
Once it complains about no wireguard config, stop Privoxyvpn if it hasn't already.
Copy one of the conf files from the mullvad zip file you downloaded to '/mnt/user/appdata/binhex-privoxyvpn/wireguard' (see note below). Each config file is a different server if you selected "all servers" during config creation. Only copy one file. At a later date, if you want to switch servers, delete everything in the wireguard folder and copy a new config, reboot Privoxyvpn.
** Pick your favorite way to get access to the '/mnt/user/appdata/' folder. I like to share the folder so I can use windows networking to get access. I know this isn't the best way, but its how I do it. Some like to use binhex krusader app.
Start Privoxyvpn and log into its console
Type: curl ifconfig.io
This will show you your WAN IP address, hopefully its showing the exit point of your mullvad VPN! Check your normal WAN by going to http://ifconfig.io/ in your normal web browser.
All done with the Privoxyvpn configuration and if the WAN IP was the VPN exit point then you are good to go. Lets move on to configuring transmission.
Stop transmission and edit the docker
Click advanced view
Set Extra Parameters to '--net=container:binhex-privoxyvpn'
Set Network Type to 'none'
Set 'Host Port 2' to the port that was generated on the mullvad setup. In our example it was '55214'. I like to click edit here, and update the default value and description.. just my preference.
Click apply and start transmission
Open the console for transmission
Type: curl ifconfig.io
This should show the same IP of the VPN WAN exit node that we saw during step 12 of the Privoxyvpn setup.
At this point every thing will be working. However, you may have noticed you don't have access to the web interface or transmission remote gui isn't connecting any more. Well read on friend, we'll get that straightened out.
Transmission Web GUI Access
Transmission is now behind a proxy, to get access we also need to be behind the proxy.
I am a primarily a chrome user. So for my case, I'm going to use Firefox to set it up as a permanent browser that is behind a VPN at all times. While my chrome is my normal un-VPN browser.
Download and install Firefox: https://www.mozilla.org/
Click the top right menu and goto 'Options'
Scroll all the way down to the bottom and click on 'Settings...' under 'Network Settings'.
Enter your unraid's LAN IP address in 'HTTP Proxy' and check the box "Also use this proxy for FTP and HTTPS'
Go to the 'Docker' page on your unraid server and look at the IP:9091 port mapping line. My example is 172.17.0.7:9091 which tells us that we can go to this port while on the VPN via: http://172.17.0.7:9091
This will give us access to our transmission web gui.
Transmission Remote GUI Access
If you have not heard of transmission remote gui, i highly recommend it. Its real nice for managing your transmission server. You can install it by going to: https://github.com/transmission-remote-gui/transgui/releases
Lets start by editing our connection.
Go to the 'Docker' page on your unraid server and look at the IP:9091 port mapping line. My example is 172.17.0.7:9091
Enter the IP and port from the previous step into transmission. In my example it was 172.17.0.7 & 9091
Goto the 'Proxy' tab and enter your unraid server's ip address and port 8118 as well as the username/password if you provided it in the privoxyvpn setup step 2.
And thats it, should be working!