mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-26 04:25:00 +00:00
set vpn provider as required param
This commit is contained in:
parent
203219a713
commit
8d8a2c3c8c
@ -23,7 +23,7 @@ ADD transmission/ /etc/transmission/
|
|||||||
|
|
||||||
ENV OPENVPN_USERNAME=**None** \
|
ENV OPENVPN_USERNAME=**None** \
|
||||||
OPENVPN_PASSWORD=**None** \
|
OPENVPN_PASSWORD=**None** \
|
||||||
OPENVPN_PROVIDER=PIA \
|
OPENVPN_PROVIDER=**None** \
|
||||||
"TRANSMISSION_ALT_SPEED_DOWN=50" \
|
"TRANSMISSION_ALT_SPEED_DOWN=50" \
|
||||||
"TRANSMISSION_ALT_SPEED_ENABLED=false" \
|
"TRANSMISSION_ALT_SPEED_ENABLED=false" \
|
||||||
"TRANSMISSION_ALT_SPEED_TIME_BEGIN=540" \
|
"TRANSMISSION_ALT_SPEED_TIME_BEGIN=540" \
|
||||||
|
17
README.md
17
README.md
@ -1,5 +1,10 @@
|
|||||||
# Transmission with WebUI and OpenVPN
|
# 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.
|
When using PIA as provider it will update Transmission hourly with assigned open port. Please read the instructions below.
|
||||||
|
|
||||||
## Run container from Docker registry
|
## Run container from Docker registry
|
||||||
@ -16,12 +21,10 @@ $ docker run --privileged -d \
|
|||||||
haugene/transmission-openvpn
|
haugene/transmission-openvpn
|
||||||
```
|
```
|
||||||
|
|
||||||
The `OPENVPN_PROVIDER` and `OPENVPN_CONFIG` are optional variables. If no provider is given, it will default to PIA.
|
You must set the environment variables `OPENVPN_PROVIDER`, `OPENVPN_USERNAME` and `OPENVPN_PASSWORD` to provide basic connection details.
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
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.
|
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
|
### Required environment options
|
||||||
| Variable | Function | Example |
|
| Variable | Function | Example |
|
||||||
|----------|----------|-------|
|
|----------|----------|-------|
|
||||||
|
|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or <br>`OPENVPN_PROVIDER=PIA` or <br>`OPENVPN_PROVIDER=TIGER`|
|
||||||
|`OPENVPN_USERNAME`|Your OpenVPN username |`OPENVPN_USERNAME=asdf`|
|
|`OPENVPN_USERNAME`|Your OpenVPN username |`OPENVPN_USERNAME=asdf`|
|
||||||
|`OPENVPN_PASSWORD`|Your OpenVPN password |`OPENVPN_PASSWORD=asdf`|
|
|`OPENVPN_PASSWORD`|Your OpenVPN password |`OPENVPN_PASSWORD=asdf`|
|
||||||
|
|
||||||
### Network configuration options
|
### Network configuration options
|
||||||
| Variable | Function | Example |
|
| Variable | Function | Example |
|
||||||
|----------|----------|-------|
|
|----------|----------|-------|
|
||||||
|`OPENVPN_PROVIDER` | Sets the OpenVPN provider to use. | `OPENVPN_PROVIDER=BTGUARD` or <br>`OPENVPN_PROVIDER=PIA`|
|
|
||||||
|`OPENVPN_CONFIG` | Sets the OpenVPN endpoint to connect to. | `OPENVPN_CONFIG=UK Southampton`|
|
|`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`|
|
|`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`|
|
||||||
|
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]
|
if [ "$OPENVPN_PROVIDER" = "BTGUARD" ]; then
|
||||||
then
|
|
||||||
echo "VPN PROVIDER: BTGUARD"
|
|
||||||
vpn_provider="btguard"
|
vpn_provider="btguard"
|
||||||
else if [ "$OPENVPN_PROVIDER" = "PIA" ]
|
elif [ "$OPENVPN_PROVIDER" = "PIA" ]; then
|
||||||
echo "VPN PROVIDER: PIA"
|
|
||||||
vpn_provider="pia"
|
vpn_provider="pia"
|
||||||
else
|
elif [ "$OPENVPN_PROVIDER" = "TIGER" ]; then
|
||||||
echo "VPN PROVIDER: TIGER"
|
|
||||||
vpn_provider="tiger"
|
vpn_provider="tiger"
|
||||||
|
else
|
||||||
|
echo "Could not find OpenVPN provider: $OPENVPN_PROVIDER"
|
||||||
|
echo "Please check your settings."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using OpenVPN provider: $OPENVPN_PROVIDER"
|
||||||
|
|
||||||
if [ ! -z "$OPENVPN_CONFIG" ]
|
if [ ! -z "$OPENVPN_CONFIG" ]
|
||||||
then
|
then
|
||||||
if [ -f /etc/openvpn/$vpn_provider/"${OPENVPN_CONFIG}".ovpn ]
|
if [ -f /etc/openvpn/$vpn_provider/"${OPENVPN_CONFIG}".ovpn ]
|
||||||
|
Loading…
Reference in New Issue
Block a user