Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c60d7c0f48 | ||
|
783612ea5a | ||
|
a5acdca41a | ||
|
70195d1dc6 | ||
|
9bf6a096df | ||
|
1f1c2666be | ||
|
0d2f5cdce7 | ||
|
6de733b7a9 | ||
|
36d1f19b6c | ||
|
e8fd7efca6 | ||
|
97b9dec17f | ||
|
5518dc1b27 | ||
|
0fce293556 | ||
|
c0d8731946 | ||
|
81db5ca399 |
56
Dockerfile
56
Dockerfile
@ -1,4 +1,5 @@
|
|||||||
FROM debian:10-slim
|
# qBittorrent, OpenVPN and WireGuard, qbittorrentvpn
|
||||||
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
@ -9,28 +10,28 @@ RUN mkdir -p /downloads /config/qBittorrent /etc/openvpn /etc/qbittorrent
|
|||||||
|
|
||||||
# Install boost
|
# Install boost
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt -y upgrade \
|
&& apt upgrade -y \
|
||||||
&& apt -y install --no-install-recommends \
|
&& apt install -y --no-install-recommends \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
g++ \
|
g++ \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
&& BOOST_VERSION_DOT=$(curl -sX GET "https://www.boost.org/feed/news.rss" | xmllint --xpath '//rss/channel/item/title/text()' - | awk -F 'Version' '{print $2 FS}' - | sed -e 's/Version//g;s/\ //g' | awk 'NR==1{print $1}' -) \
|
&& BOOST_VERSION_DOT=$(curl -sX GET "https://www.boost.org/feed/news.rss" | xmllint --xpath '//rss/channel/item/title/text()' - | awk -F 'Version' '{print $2 FS}' - | sed -e 's/Version//g;s/\ //g' | xargs | awk 'NR==1{print $1}' -) \
|
||||||
&& BOOST_VERSION=$(echo ${BOOST_VERSION_DOT} | head -n 1 | sed -e 's/\./_/g') \
|
&& BOOST_VERSION=$(echo ${BOOST_VERSION_DOT} | head -n 1 | sed -e 's/\./_/g') \
|
||||||
&& curl -o /opt/boost_${BOOST_VERSION}.tar.gz -L https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.gz \
|
&& curl -o /opt/boost_${BOOST_VERSION}.tar.gz -L https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.gz \
|
||||||
&& tar -xzf /opt/boost_${BOOST_VERSION}.tar.gz -C /opt \
|
&& tar -xzf /opt/boost_${BOOST_VERSION}.tar.gz -C /opt \
|
||||||
&& cd /opt/boost_${BOOST_VERSION} \
|
&& cd /opt/boost_${BOOST_VERSION} \
|
||||||
&& ./bootstrap.sh --prefix=/usr \
|
&& ./bootstrap.sh --prefix=/usr \
|
||||||
&& ./b2 --prefix=/usr install \
|
&& ./b2 --prefix=/usr install \
|
||||||
&& cd /opt \
|
&& cd /opt \
|
||||||
&& rm -rf /opt/* \
|
&& rm -rf /opt/* \
|
||||||
&& apt -y purge \
|
&& apt purge -y \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
g++ \
|
g++ \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt -y autoremove \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
@ -45,7 +46,7 @@ RUN apt update \
|
|||||||
jq \
|
jq \
|
||||||
unzip \
|
unzip \
|
||||||
&& NINJA_ASSETS=$(curl -sX GET "https://api.github.com/repos/ninja-build/ninja/releases" | jq '.[] | select(.prerelease==false) | .assets_url' | head -n 1 | tr -d '"') \
|
&& NINJA_ASSETS=$(curl -sX GET "https://api.github.com/repos/ninja-build/ninja/releases" | jq '.[] | select(.prerelease==false) | .assets_url' | head -n 1 | tr -d '"') \
|
||||||
&& NINJA_DOWNLOAD_URL=$(curl -sX GET ${NINJA_ASSETS} | jq '.[] | select(.name | contains("ninja-linux")) .browser_download_url' | tr -d '"') \
|
&& NINJA_DOWNLOAD_URL=$(curl -sX GET ${NINJA_ASSETS} | jq '.[] | select(.name | match("ninja-linux";"i")) .browser_download_url' | tr -d '"') \
|
||||||
&& curl -o /opt/ninja-linux.zip -L ${NINJA_DOWNLOAD_URL} \
|
&& curl -o /opt/ninja-linux.zip -L ${NINJA_DOWNLOAD_URL} \
|
||||||
&& unzip /opt/ninja-linux.zip -d /opt \
|
&& unzip /opt/ninja-linux.zip -d /opt \
|
||||||
&& mv /opt/ninja /usr/local/bin/ninja \
|
&& mv /opt/ninja /usr/local/bin/ninja \
|
||||||
@ -57,7 +58,7 @@ RUN apt update \
|
|||||||
jq \
|
jq \
|
||||||
unzip \
|
unzip \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
@ -71,7 +72,7 @@ RUN apt update \
|
|||||||
curl \
|
curl \
|
||||||
jq \
|
jq \
|
||||||
&& CMAKE_ASSETS=$(curl -sX GET "https://api.github.com/repos/Kitware/CMake/releases" | jq '.[] | select(.prerelease==false) | .assets_url' | head -n 1 | tr -d '"') \
|
&& CMAKE_ASSETS=$(curl -sX GET "https://api.github.com/repos/Kitware/CMake/releases" | jq '.[] | select(.prerelease==false) | .assets_url' | head -n 1 | tr -d '"') \
|
||||||
&& CMAKE_DOWNLOAD_URL=$(curl -sX GET ${CMAKE_ASSETS} | jq '.[] | select(.name | contains("Linux-x86_64.sh")) .browser_download_url' | tr -d '"') \
|
&& CMAKE_DOWNLOAD_URL=$(curl -sX GET ${CMAKE_ASSETS} | jq '.[] | select(.name | match("Linux-x86_64.sh";"i")) .browser_download_url' | tr -d '"') \
|
||||||
&& curl -o /opt/cmake.sh -L ${CMAKE_DOWNLOAD_URL} \
|
&& curl -o /opt/cmake.sh -L ${CMAKE_DOWNLOAD_URL} \
|
||||||
&& chmod +x /opt/cmake.sh \
|
&& chmod +x /opt/cmake.sh \
|
||||||
&& /bin/bash /opt/cmake.sh --skip-license --prefix=/usr \
|
&& /bin/bash /opt/cmake.sh --skip-license --prefix=/usr \
|
||||||
@ -81,7 +82,7 @@ RUN apt update \
|
|||||||
curl \
|
curl \
|
||||||
jq \
|
jq \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
@ -93,16 +94,9 @@ RUN apt update \
|
|||||||
&& apt install -y --no-install-recommends \
|
&& apt install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
git \
|
||||||
jq \
|
&& git clone --recursive https://github.com/arvidn/libtorrent.git \
|
||||||
libssl-dev \
|
&& cd /opt/libtorrent \
|
||||||
&& LIBTORRENT_ASSETS=$(curl -sX GET "https://api.github.com/repos/arvidn/libtorrent/releases" | jq '.[] | select(.prerelease==false) | select(.target_commitish=="RC_2_0") | .assets_url' | head -n 1 | tr -d '"') \
|
|
||||||
&& LIBTORRENT_DOWNLOAD_URL=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .browser_download_url' | tr -d '"') \
|
|
||||||
&& LIBTORRENT_NAME=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .name' | tr -d '"') \
|
|
||||||
&& curl -o /opt/${LIBTORRENT_NAME} -L ${LIBTORRENT_DOWNLOAD_URL} \
|
|
||||||
&& tar -xzf /opt/${LIBTORRENT_NAME} \
|
|
||||||
&& rm /opt/${LIBTORRENT_NAME} \
|
|
||||||
&& cd /opt/libtorrent-rasterbar* \
|
|
||||||
&& cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_STANDARD=17 \
|
&& cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_STANDARD=17 \
|
||||||
&& cmake --build build --parallel $(nproc) \
|
&& cmake --build build --parallel $(nproc) \
|
||||||
&& cmake --install build \
|
&& cmake --install build \
|
||||||
@ -111,11 +105,9 @@ RUN apt update \
|
|||||||
&& apt purge -y \
|
&& apt purge -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
git \
|
||||||
jq \
|
|
||||||
libssl-dev \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
@ -152,7 +144,7 @@ RUN apt update \
|
|||||||
qttools5-dev \
|
qttools5-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
@ -170,6 +162,7 @@ RUN echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.li
|
|||||||
iptables \
|
iptables \
|
||||||
kmod \
|
kmod \
|
||||||
libqt5network5 \
|
libqt5network5 \
|
||||||
|
libqt5sql5 \
|
||||||
libqt5xml5 \
|
libqt5xml5 \
|
||||||
libssl1.1 \
|
libssl1.1 \
|
||||||
moreutils \
|
moreutils \
|
||||||
@ -179,29 +172,32 @@ RUN echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.li
|
|||||||
procps \
|
procps \
|
||||||
wireguard-tools \
|
wireguard-tools \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
# Install (un)compressing tools like unrar, 7z, unzip and zip
|
# Install (un)compressing tools like unrar, 7z, unzip and zip
|
||||||
RUN echo "deb http://deb.debian.org/debian/ buster non-free" > /etc/apt/sources.list.d/non-free-unrar.list \
|
RUN echo "deb http://deb.debian.org/debian/ bullseye non-free" > /etc/apt/sources.list.d/non-free-unrar.list \
|
||||||
&& printf 'Package: *\nPin: release a=non-free\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-non-free \
|
&& printf 'Package: *\nPin: release a=non-free\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-non-free \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt -y upgrade \
|
&& apt -y upgrade \
|
||||||
&& apt -y install --no-install-recommends \
|
&& apt install -y --no-install-recommends \
|
||||||
unrar \
|
unrar \
|
||||||
p7zip-full \
|
p7zip-full \
|
||||||
unzip \
|
unzip \
|
||||||
zip \
|
zip \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt -y autoremove \
|
&& apt autoremove -y --purge \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
|
# Remove src_valid_mark from wg-quick
|
||||||
|
RUN sed -i /net\.ipv4\.conf\.all\.src_valid_mark/d `which wg-quick`
|
||||||
|
|
||||||
VOLUME /config /downloads
|
VOLUME /config /downloads
|
||||||
|
|
||||||
ADD openvpn/ /etc/openvpn/
|
ADD openvpn/ /etc/openvpn/
|
||||||
|
37
README.md
37
README.md
@ -7,8 +7,8 @@ Docker container which runs the latest [qBittorrent](https://github.com/qbittorr
|
|||||||
[preview]: https://raw.githubusercontent.com/DyonR/docker-templates/master/Screenshots/qbittorrentvpn/qbittorrentvpn-webui.png "qBittorrent WebUI"
|
[preview]: https://raw.githubusercontent.com/DyonR/docker-templates/master/Screenshots/qbittorrentvpn/qbittorrentvpn-webui.png "qBittorrent WebUI"
|
||||||
![alt text][preview]
|
![alt text][preview]
|
||||||
|
|
||||||
## Docker Features
|
# Docker Features
|
||||||
* Base: Debian 10-slim
|
* Base: Debian bullseye-slim
|
||||||
* [qBittorrent](https://github.com/qbittorrent/qBittorrent) compiled from source
|
* [qBittorrent](https://github.com/qbittorrent/qBittorrent) compiled from source
|
||||||
* [libtorrent](https://github.com/arvidn/libtorrent) compiled from source
|
* [libtorrent](https://github.com/arvidn/libtorrent) compiled from source
|
||||||
* Compiled with the latest version of [Boost](https://www.boost.org/)
|
* Compiled with the latest version of [Boost](https://www.boost.org/)
|
||||||
@ -19,22 +19,34 @@ Docker container which runs the latest [qBittorrent](https://github.com/qbittorr
|
|||||||
* Created with [Unraid](https://unraid.net/) in mind
|
* Created with [Unraid](https://unraid.net/) in mind
|
||||||
* BitTorrent port 8999 exposed by default
|
* BitTorrent port 8999 exposed by default
|
||||||
|
|
||||||
# Run container from Docker registry
|
## Run container from Docker registry
|
||||||
The container is available from the Docker registry and this is the simplest way to get it
|
The container is available from the Docker registry and this is the simplest way to get it
|
||||||
To run the container use this command, with additional parameters, please refer to the Variables, Volumes, and Ports section:
|
To run the container use this command, with additional parameters, please refer to the Variables, Volumes, and Ports section:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run --privileged -d \
|
$ docker run -d \
|
||||||
-v /your/config/path/:/config \
|
-v /your/config/path/:/config \
|
||||||
-v /your/downloads/path/:/downloads \
|
-v /your/downloads/path/:/downloads \
|
||||||
-e "VPN_ENABLED=yes" \
|
-e "VPN_ENABLED=yes" \
|
||||||
-e "VPN_TYPE=wireguard" \
|
-e "VPN_TYPE=wireguard" \
|
||||||
-e "LAN_NETWORK=192.168.0.0/24" \
|
-e "LAN_NETWORK=192.168.0.0/24" \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
|
--cap-add NET_ADMIN \
|
||||||
|
--sysctl "net.ipv4.conf.all.src_valid_mark=1" \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
dyonr/qbittorrentvpn
|
dyonr/qbittorrentvpn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Docker Tags
|
||||||
|
| Tag | Description |
|
||||||
|
|----------|----------|
|
||||||
|
| `dyonr/qbittorrentvpn:latest` | The latest version of qBittorrent with libtorrent 1_x_x |
|
||||||
|
| `dyonr/qbittorrentvpn:rc_2_0` | The latest version of qBittorrent with libtorrent 2_x_x |
|
||||||
|
| `dyonr/qbittorrentvpn:legacy_iptables` | The latest version of qBittorrent, libtorrent 1_x_x and an experimental feature to fix problems with QNAP NAS systems, [Issue #25](https://github.com/DyonR/docker-qbittorrentvpn/issues/25) |
|
||||||
|
| `dyonr/qbittorrentvpn:alpha` | The latest alpha version of qBittorrent with libtorrent 2_0, incase you feel like testing new features |
|
||||||
|
| `dyonr/qbittorrentvpn:dev` | This branch is used for testing new Docker features or improvements before merging it to the main branch |
|
||||||
|
| `dyonr/qbittorrentvpn:v4_2_x` | (Legacy) qBittorrent version 4.2.x with libtorrent 1_x_x |
|
||||||
|
|
||||||
# Variables, Volumes, and Ports
|
# Variables, Volumes, and Ports
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
| Variable | Required | Function | Example | Default |
|
| Variable | Required | Function | Example | Default |
|
||||||
@ -44,6 +56,7 @@ $ docker run --privileged -d \
|
|||||||
|`VPN_USERNAME`| No | If username and password provided, configures ovpn file automatically |`VPN_USERNAME=ad8f64c02a2de`||
|
|`VPN_USERNAME`| No | If username and password provided, configures ovpn file automatically |`VPN_USERNAME=ad8f64c02a2de`||
|
||||||
|`VPN_PASSWORD`| No | If username and password provided, configures ovpn file automatically |`VPN_PASSWORD=ac98df79ed7fb`||
|
|`VPN_PASSWORD`| No | If username and password provided, configures ovpn file automatically |`VPN_PASSWORD=ac98df79ed7fb`||
|
||||||
|`LAN_NETWORK`| Yes (atleast one) | Comma delimited local Network's with CIDR notation |`LAN_NETWORK=192.168.0.0/24,10.10.0.0/24`||
|
|`LAN_NETWORK`| Yes (atleast one) | Comma delimited local Network's with CIDR notation |`LAN_NETWORK=192.168.0.0/24,10.10.0.0/24`||
|
||||||
|
|`LEGACY_IPTABLES`| No | Use `iptables (legacy)` instead of `iptables (nf_tables)` |`LEGACY_IPTABLES=yes`||
|
||||||
|`ENABLE_SSL`| No | Let the container handle SSL (yes/no)? |`ENABLE_SSL=yes`|`yes`|
|
|`ENABLE_SSL`| No | Let the container handle SSL (yes/no)? |`ENABLE_SSL=yes`|`yes`|
|
||||||
|`NAME_SERVERS`| No | Comma delimited name servers |`NAME_SERVERS=1.1.1.1,1.0.0.1`|`1.1.1.1,1.0.0.1`|
|
|`NAME_SERVERS`| No | Comma delimited name servers |`NAME_SERVERS=1.1.1.1,1.0.0.1`|`1.1.1.1,1.0.0.1`|
|
||||||
|`PUID`| No | UID applied to /config files and /downloads |`PUID=99`|`99`|
|
|`PUID`| No | UID applied to /config files and /downloads |`PUID=99`|`99`|
|
||||||
@ -79,10 +92,18 @@ Access https://IPADDRESS:PORT from a browser on the same network. (for example:
|
|||||||
|`password`| `adminadmin` |
|
|`password`| `adminadmin` |
|
||||||
|
|
||||||
# How to use WireGuard
|
# How to use WireGuard
|
||||||
The container will fail to boot if `VPN_ENABLED` is set and there is no valid .conf file present in the /config/wireguard directory. Drop a .conf file from your VPN provider into /config/wireguard and start the container again. The file must have the name `wg0.conf`.
|
The container will fail to boot if `VPN_ENABLED` is set and there is no valid .conf file present in the /config/wireguard directory. Drop a .conf file from your VPN provider into /config/wireguard and start the container again. The file must have the name `wg0.conf`, or it will fail to start.
|
||||||
|
|
||||||
|
## WireGuard IPv6 issues
|
||||||
|
If you use WireGuard and also have IPv6 enabled, it is necessary to add the IPv6 range to the `LAN_NETWORK` environment variable.
|
||||||
|
Additionally the parameter `--sysctl net.ipv6.conf.all.disable_ipv6=0` also must be added to the `docker run` command, or to the "Extra Parameters" in Unraid.
|
||||||
|
The full Unraid `Extra Parameters` would be: `--restart unless-stopped --sysctl net.ipv6.conf.all.disable_ipv6=0"`
|
||||||
|
If you do not do this, the container will keep on stopping with the error `RTNETLINK answers permission denied`.
|
||||||
|
Since I do not have IPv6, I am did not test.
|
||||||
|
Thanks to [mchangrh](https://github.com/mchangrh) / [Issue #49](https://github.com/DyonR/docker-qbittorrentvpn/issues/49)
|
||||||
|
|
||||||
# How to use OpenVPN
|
# How to use OpenVPN
|
||||||
The container will fail to boot if `VPN_ENABLED` is set and there is no valid .ovpn file present in the /config/openvpn directory. Drop a .ovpn file from your VPN provider into /config/openvpn and start the container again. You may need to edit the ovpn configuration file to load your VPN credentials from a file by setting `auth-user-pass`.
|
The container will fail to boot if `VPN_ENABLED` is set and there is no valid .ovpn file present in the /config/openvpn directory. Drop a .ovpn file from your VPN provider into /config/openvpn (if necessary with additional files like certificates) and start the container again. You may need to edit the ovpn configuration file to load your VPN credentials from a file by setting `auth-user-pass`.
|
||||||
|
|
||||||
**Note:** The script will use the first ovpn file it finds in the /config/openvpn directory. Adding multiple ovpn files will not start multiple VPN connections.
|
**Note:** The script will use the first ovpn file it finds in the /config/openvpn directory. Adding multiple ovpn files will not start multiple VPN connections.
|
||||||
|
|
||||||
@ -104,8 +125,8 @@ id <username>
|
|||||||
|
|
||||||
# Issues
|
# Issues
|
||||||
If you are having issues with this container please submit an issue on GitHub.
|
If you are having issues with this container please submit an issue on GitHub.
|
||||||
Please provide logs, docker version and other information that can simplify reproducing the issue.
|
Please provide logs, Docker version and other information that can simplify reproducing the issue.
|
||||||
Using the latest stable verison of Docker is always recommended. Support for older version is on a best-effort basis.
|
If possible, always use the most up to date version of Docker, you operating system, kernel and the container itself. Support is always a best-effort basis.
|
||||||
|
|
||||||
### Credits:
|
### Credits:
|
||||||
[MarkusMcNugen/docker-qBittorrentvpn](https://github.com/MarkusMcNugen/docker-qBittorrentvpn)
|
[MarkusMcNugen/docker-qBittorrentvpn](https://github.com/MarkusMcNugen/docker-qBittorrentvpn)
|
||||||
|
@ -13,7 +13,7 @@ if [[ ! -z "${check_network}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export VPN_ENABLED=$(echo "${VPN_ENABLED}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
|
export VPN_ENABLED=$(echo "${VPN_ENABLED,,}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')
|
||||||
if [[ ! -z "${VPN_ENABLED}" ]]; then
|
if [[ ! -z "${VPN_ENABLED}" ]]; then
|
||||||
echo "[INFO] VPN_ENABLED defined as '${VPN_ENABLED}'" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[INFO] VPN_ENABLED defined as '${VPN_ENABLED}'" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
else
|
else
|
||||||
@ -21,20 +21,20 @@ else
|
|||||||
export VPN_ENABLED="yes"
|
export VPN_ENABLED="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# export LEGACY_IPTABLES=$(echo "${LEGACY_IPTABLES,,}")
|
export LEGACY_IPTABLES=$(echo "${LEGACY_IPTABLES,,}")
|
||||||
# echo "[INFO] LEGACY_IPTABLES is set to '${LEGACY_IPTABLES}'" | ts '%Y-%m-%d %H:%M:%.S'
|
iptables_version=$(iptables -V)
|
||||||
# if [[ $LEGACY_IPTABLES == "1" || $LEGACY_IPTABLES == "true" || $LEGACY_IPTABLES == "yes" ]]; then
|
echo "[INFO] The container is currently running ${iptables_version}." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
# echo "[INFO] Linking /usr/sbin/iptables-legacy to /usr/sbin/iptables" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[INFO] LEGACY_IPTABLES is set to '${LEGACY_IPTABLES}'" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
# ln -sf /usr/sbin/iptables-legacy /usr/sbin/iptables > /dev/null 2>&1
|
if [[ $LEGACY_IPTABLES == "1" || $LEGACY_IPTABLES == "true" || $LEGACY_IPTABLES == "yes" ]]; then
|
||||||
# echo "[INFO] Linking /usr/sbin/iptables-legacy-save to /usr/sbin/iptables-save" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[INFO] Setting iptables to iptables (legacy)" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
# ln -sf /usr/sbin/iptables-legacy-save /usr/sbin/iptables-save > /dev/null 2>&1
|
update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
# echo "[INFO] Linking /usr/sbin/iptables-legacy-restore to /usr/sbin/iptables-restore" | ts '%Y-%m-%d %H:%M:%.S'
|
iptables_version=$(iptables -V)
|
||||||
# ln -sf /usr/sbin/iptables-legacy-restore /usr/sbin/iptables-restore > /dev/null 2>&1
|
echo "[INFO] The container is now running ${iptables_version}." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
# else
|
else
|
||||||
# echo "[INFO] Not making any changes to iptables" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[INFO] Not making any changes to iptables version" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
if [[ $VPN_ENABLED == "yes" ]]; then
|
if [[ $VPN_ENABLED == "1" || $VPN_ENABLED == "true" || $VPN_ENABLED == "yes" ]]; then
|
||||||
# Check if VPN_TYPE is set.
|
# Check if VPN_TYPE is set.
|
||||||
if [[ -z "${VPN_TYPE}" ]]; then
|
if [[ -z "${VPN_TYPE}" ]]; then
|
||||||
echo "[WARNING] VPN_TYPE not set, defaulting to OpenVPN." | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[WARNING] VPN_TYPE not set, defaulting to OpenVPN." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
@ -231,7 +231,7 @@ if [[ $VPN_ENABLED == "yes" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $VPN_ENABLED == "no" ]]; then
|
else
|
||||||
echo "[WARNING] !!IMPORTANT!! You have set the VPN to disabled, your connection will NOT be secure!" | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[WARNING] !!IMPORTANT!! You have set the VPN to disabled, your connection will NOT be secure!" | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
[BitTorrent]
|
[BitTorrent]
|
||||||
Session\BTProtocol=Both
|
Session\BTProtocol=Both
|
||||||
|
Session\DefaultSavePath=/downloads
|
||||||
|
Session\TempPath=/downloads/temp
|
||||||
|
Session\TempPathEnabled=true
|
||||||
|
Session\UseRandomPort=true
|
||||||
|
Session\Port=8999
|
||||||
|
|
||||||
[Preferences]
|
[Preferences]
|
||||||
Connection\PortRangeMin=8999
|
|
||||||
Downloads\SavePath=/downloads/
|
|
||||||
Downloads\TempPath=/downloads/temp/
|
|
||||||
Downloads\TempPathEnabled=true
|
|
||||||
General\UseRandomPort=false
|
|
||||||
WebUI\Username=admin
|
WebUI\Username=admin
|
||||||
WebUI\Port=8080
|
WebUI\Port=8080
|
||||||
WebUI\HostHeaderValidation=false
|
WebUI\HostHeaderValidation=false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user