diff --git a/Dockerfile b/Dockerfile index cab1379..d9df623 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Transmission and OpenVPN # -# Version 1.2 +# Version 1.3 FROM ubuntu:14.04 MAINTAINER Kristian Haugene @@ -23,7 +23,7 @@ ADD transmission/ /etc/transmission/ ENV OPENVPN_USERNAME=**None** \ OPENVPN_PASSWORD=**None** \ - OPENVPN_PROVIDER=PIA \ + OPENVPN_PROVIDER=**None** \ "TRANSMISSION_ALT_SPEED_DOWN=50" \ "TRANSMISSION_ALT_SPEED_ENABLED=false" \ "TRANSMISSION_ALT_SPEED_TIME_BEGIN=540" \ diff --git a/README.md b/README.md index a295f64..c2f11e5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Transmission with WebUI and OpenVPN -This Docker container lets you run Transmission with WebUI while connecting to either BTGUARD or PIA OpenVPN. +Docker container which runs Transmission torrent client with WebUI while connecting to OpenVPN. +It bundles certificates and configurations for the following VPN providers: +* Private Internet Access +* BTGuard +* TigerVPN + When using PIA as provider it will update Transmission hourly with assigned open port. Please read the instructions below. ## Run container from Docker registry @@ -16,12 +21,10 @@ $ docker run --privileged -d \ haugene/transmission-openvpn ``` -The `OPENVPN_PROVIDER` and `OPENVPN_CONFIG` are optional variables. If no provider is given, it will default to PIA. -If no config is given, a default config will be selected for the provider you have chosen. -The only mandatory environment variables are your OpenVPN username and password. -You must set the environment variables `OPENVPN_USERNAME` and `OPENVPN_PASSWORD` to the credentials given by your OpenVPN provider. +You must set the environment variables `OPENVPN_PROVIDER`, `OPENVPN_USERNAME` and `OPENVPN_PASSWORD` to provide basic connection details. -Find the OpenVPN configurations avaliable by looking in the openvpn folder of the GitHub repository. +The `OPENVPN_CONFIG` is an optional variable. If no config is given, a default config will be selected for the provider you have chosen. +Find available OpenVPN configurations by looking in the openvpn folder of the GitHub repository. As you can see, the container also expects a data volume to be mounted. This is where Transmission will store your downloads, incomplete downloads and look for a watch directory for new .torrent files. @@ -31,13 +34,13 @@ By default there will also be created a transmission-home folder under /data whe ### Required environment options | Variable | Function | Example | |----------|----------|-------| +|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or
`OPENVPN_PROVIDER=PIA` or
`OPENVPN_PROVIDER=TIGER`| |`OPENVPN_USERNAME`|Your OpenVPN username |`OPENVPN_USERNAME=asdf`| |`OPENVPN_PASSWORD`|Your OpenVPN password |`OPENVPN_PASSWORD=asdf`| ### Network configuration options | Variable | Function | Example | |----------|----------|-------| -|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or
`OPENVPN_PROVIDER=PIA`| |`OPENVPN_CONFIG` | Sets the OpenVPN endpoint to connect to. | `OPENVPN_CONFIG=UK Southampton`| |`RESOLV_OVERRIDE` | The value of this variable will be written to `/etc/resolv.conf`. | `RESOLV_OVERRIDE=nameserver 8.8.8.8\nnameserver 8.8.4.4\n`| diff --git a/openvpn/start.sh b/openvpn/start.sh index e13bfbe..ea12678 100755 --- a/openvpn/start.sh +++ b/openvpn/start.sh @@ -1,14 +1,19 @@ #!/bin/sh -if [ "$OPENVPN_PROVIDER" = "BTGUARD" ] -then - echo "VPN PROVIDER: BTGUARD" +if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]; then vpn_provider="btguard" -else - echo "VPN PROVIDER: PIA" +elif [ "$OPENVPN_PROVIDER" = "PIA" ]; then vpn_provider="pia" +elif [ "$OPENVPN_PROVIDER" = "TIGER" ]; then + vpn_provider="tiger" +else + echo "Could not find OpenVPN provider: $OPENVPN_PROVIDER" + echo "Please check your settings." + exit 1 fi +echo "Using OpenVPN provider: $OPENVPN_PROVIDER" + if [ ! -z "$OPENVPN_CONFIG" ] then if [ -f /etc/openvpn/$vpn_provider/"${OPENVPN_CONFIG}".ovpn ] diff --git a/openvpn/tiger/AT Vienna.ovpn b/openvpn/tiger/AT Vienna.ovpn new file mode 100644 index 0000000..fd9470b --- /dev/null +++ b/openvpn/tiger/AT Vienna.ovpn @@ -0,0 +1,17 @@ +client +remote vie.tigervpn.com 1194 udp +remote vie.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/CA Montreal.ovpn b/openvpn/tiger/CA Montreal.ovpn new file mode 100644 index 0000000..4372ecb --- /dev/null +++ b/openvpn/tiger/CA Montreal.ovpn @@ -0,0 +1,17 @@ +client +remote mon.tigervpn.com 1194 udp +remote mon.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/CA Toronto.ovpn b/openvpn/tiger/CA Toronto.ovpn new file mode 100644 index 0000000..3177d09 --- /dev/null +++ b/openvpn/tiger/CA Toronto.ovpn @@ -0,0 +1,17 @@ +client +remote tor.tigervpn.com 1194 udp +remote tor.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/CH Zurich.ovpn b/openvpn/tiger/CH Zurich.ovpn new file mode 100644 index 0000000..f8dd171 --- /dev/null +++ b/openvpn/tiger/CH Zurich.ovpn @@ -0,0 +1,17 @@ +client +remote zur.tigervpn.com 1194 udp +remote zur.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/DK Copenhagen.ovpn b/openvpn/tiger/DK Copenhagen.ovpn new file mode 100644 index 0000000..ce1d739 --- /dev/null +++ b/openvpn/tiger/DK Copenhagen.ovpn @@ -0,0 +1,17 @@ +client +remote cop.tigervpn.com 1194 udp +remote cop.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/ES Madrid.ovpn b/openvpn/tiger/ES Madrid.ovpn new file mode 100644 index 0000000..ee054f4 --- /dev/null +++ b/openvpn/tiger/ES Madrid.ovpn @@ -0,0 +1,17 @@ +client +remote mad.tigervpn.com 1194 udp +remote mad.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/GB London.ovpn b/openvpn/tiger/GB London.ovpn new file mode 100644 index 0000000..62dbe40 --- /dev/null +++ b/openvpn/tiger/GB London.ovpn @@ -0,0 +1,17 @@ +client +remote lon.tigervpn.com 1194 udp +remote lon.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/NL Amsterdam.ovpn b/openvpn/tiger/NL Amsterdam.ovpn new file mode 100644 index 0000000..a5a1bb9 --- /dev/null +++ b/openvpn/tiger/NL Amsterdam.ovpn @@ -0,0 +1,17 @@ +client +remote ams.tigervpn.com 1194 udp +remote ams.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/RO Bucharest.ovpn b/openvpn/tiger/RO Bucharest.ovpn new file mode 100644 index 0000000..a9a0618 --- /dev/null +++ b/openvpn/tiger/RO Bucharest.ovpn @@ -0,0 +1,17 @@ +client +remote buc.tigervpn.com 1194 udp +remote buc.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/US Atlanta.ovpn b/openvpn/tiger/US Atlanta.ovpn new file mode 100644 index 0000000..4b4a284 --- /dev/null +++ b/openvpn/tiger/US Atlanta.ovpn @@ -0,0 +1,17 @@ +client +remote atl.tigervpn.com 1194 udp +remote atl.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/US Denver.ovpn b/openvpn/tiger/US Denver.ovpn new file mode 100644 index 0000000..2fed7e8 --- /dev/null +++ b/openvpn/tiger/US Denver.ovpn @@ -0,0 +1,17 @@ +client +remote den.tigervpn.com 1194 udp +remote den.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/US Los Angeles.ovpn b/openvpn/tiger/US Los Angeles.ovpn new file mode 100644 index 0000000..eb5dcbf --- /dev/null +++ b/openvpn/tiger/US Los Angeles.ovpn @@ -0,0 +1,17 @@ +client +remote los.tigervpn.com 1194 udp +remote los.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/US Miami.ovpn b/openvpn/tiger/US Miami.ovpn new file mode 100644 index 0000000..47892c1 --- /dev/null +++ b/openvpn/tiger/US Miami.ovpn @@ -0,0 +1,17 @@ +client +remote mia.tigervpn.com 1194 udp +remote mia.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/US New York.ovpn b/openvpn/tiger/US New York.ovpn new file mode 100644 index 0000000..14c1d54 --- /dev/null +++ b/openvpn/tiger/US New York.ovpn @@ -0,0 +1,17 @@ +client +remote nyc.tigervpn.com 1194 udp +remote nyc.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file diff --git a/openvpn/tiger/ca.crt b/openvpn/tiger/ca.crt new file mode 100644 index 0000000..74b969b --- /dev/null +++ b/openvpn/tiger/ca.crt @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFEjCCA/qgAwIBAgIJAIjMlbROS8jhMA0GCSqGSIb3DQEBBQUAMIG2MQswCQYD +VQQGEwJTSzETMBEGA1UECBMKQnJhdGlzbGF2YTETMBEGA1UEBxMKQnJhdGlzbGF2 +YTEiMCAGA1UEChQZVGlnZXIgQXQgV29yayAmIENvLiBrLiBzLjERMA8GA1UECxMI +dGlnZXJWUE4xETAPBgNVBAMTCHRpZ2VyVlBOMREwDwYDVQQpEwh0aWdlclZQTjEg +MB4GCSqGSIb3DQEJARYRaGVscEB0aWdlcnZwbi5jb20wHhcNMTIwODI5MDkzMTAy +WhcNMjIwODI3MDkzMTAyWjCBtjELMAkGA1UEBhMCU0sxEzARBgNVBAgTCkJyYXRp +c2xhdmExEzARBgNVBAcTCkJyYXRpc2xhdmExIjAgBgNVBAoUGVRpZ2VyIEF0IFdv +cmsgJiBDby4gay4gcy4xETAPBgNVBAsTCHRpZ2VyVlBOMREwDwYDVQQDEwh0aWdl +clZQTjERMA8GA1UEKRMIdGlnZXJWUE4xIDAeBgkqhkiG9w0BCQEWEWhlbHBAdGln +ZXJ2cG4uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq+5MYICy +JdtTquFNOfDq4c3Li4LPWZWAFHdCpOF8Qnjfcr3L9Mrn484Cb2qse3gvMMV5JvEy +lJvOZ8HvMZs8y4S7n0PsDAmry97zuymzzYrjiRPDqa47/DkcQ05vGKMiTC3UQC21 +buY/STmJGoeUASDFxK2qEXXjQl42hAetrMw/AN2evQevuS6K1/TnWUIdEzo4Z9Gw +8EhwlqnW+kvbgikivKGM9V7szq2zy2R9gLj5GBzXqqP0eqRop17z95kam5rfmGcJ +B7yfqlEa6VcfoVw928fVUAf9vCIqlDpOKyiTTKQbTFZNP2CKFqiaY3bNSGMwTtDr +9DVIWZdYMmY9mwIDAQABo4IBHzCCARswHQYDVR0OBBYEFFsJk/x8flJjTG/vwJhN +vgTPFViFMIHrBgNVHSMEgeMwgeCAFFsJk/x8flJjTG/vwJhNvgTPFViFoYG8pIG5 +MIG2MQswCQYDVQQGEwJTSzETMBEGA1UECBMKQnJhdGlzbGF2YTETMBEGA1UEBxMK +QnJhdGlzbGF2YTEiMCAGA1UEChQZVGlnZXIgQXQgV29yayAmIENvLiBrLiBzLjER +MA8GA1UECxMIdGlnZXJWUE4xETAPBgNVBAMTCHRpZ2VyVlBOMREwDwYDVQQpEwh0 +aWdlclZQTjEgMB4GCSqGSIb3DQEJARYRaGVscEB0aWdlcnZwbi5jb22CCQCIzJW0 +TkvI4TAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAl22f6l8hgvERZ +qk0D9tT1Gg+ltGJGp5tvH4neTSn45UCbvdjKzgaDB2jB4rHoHEfMPtqAiV6eTEUx +oYGLSQDvWpKEsv0TIQruHwe9LfYidJ7HAMShSkWbqsXF7D9E8TCcTw5M1JLsOpJQ +7LaixOOFL+cj8bnn1E51o8DakSHqBW7D6YVAS//xijlEIuPaxV3AEoxlIi1WjNMu +2ri06yj+ZKDcZhlBFn8PPDR9lOlJ5Qt7j9S2be5QweW/gFZN9XWTNU7bHR/OkTYB +Ba+NcMGRZBjxSvkiHGJLQfTFcsISEhzXcnX2W+qs9egUFHrZ05/gf5T1pebhala0 +CIc3Y29/ +-----END CERTIFICATE----- diff --git a/openvpn/tiger/deafult.ovpn b/openvpn/tiger/deafult.ovpn new file mode 100644 index 0000000..d94ff3f --- /dev/null +++ b/openvpn/tiger/deafult.ovpn @@ -0,0 +1 @@ +frankfurt.ovpn \ No newline at end of file diff --git a/openvpn/tiger/frankfurt.ovpn b/openvpn/tiger/frankfurt.ovpn new file mode 100644 index 0000000..9f5b8ff --- /dev/null +++ b/openvpn/tiger/frankfurt.ovpn @@ -0,0 +1,17 @@ +client +remote fra.tigervpn.com 1194 udp +remote fra.tigervpn.com 443 tcp-client +pull +comp-lzo adaptive +dev tun +tls-client +cipher AES-256-CBC +mute 10 + +ca /etc/openvpn/tiger/ca.crt +auth-user-pass /config/openvpn-credentials.txt + +# OpenVPN control startup and shut down of transmission +script-security 2 +up /etc/transmission/start.sh +down /etc/transmission/stop.sh \ No newline at end of file