Merge pull request #72 from DyonR/dev

Fixed #70 (missing dependency), added LEGACY_IPTABLES to README, exclude 'rc' releases
This commit is contained in:
DyonR 2021-11-02 16:43:20 +01:00 committed by GitHub
commit 0981380ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 9 deletions

View File

@ -136,7 +136,7 @@ RUN apt update \
qtbase5-dev \
qttools5-dev \
zlib1g-dev \
&& QBITTORRENT_RELEASE=$(curl -sX GET "https://api.github.com/repos/qBittorrent/qBittorrent/tags" | jq '.[] | select(.name | index ("beta") | not) | .name' | head -n 1 | tr -d '"') \
&& QBITTORRENT_RELEASE=$(curl -sX GET "https://api.github.com/repos/qBittorrent/qBittorrent/tags" | jq '.[] | select(.name | index ("beta") | not) | select(.name | index ("rc") | not) | .name' | head -n 1 | tr -d '"') \
&& curl -o /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz -L "https://github.com/qbittorrent/qBittorrent/archive/${QBITTORRENT_RELEASE}.tar.gz" \
&& tar -xzf /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz \
&& rm /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz \
@ -177,6 +177,7 @@ RUN echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.li
kmod \
libqt5network5 \
libqt5xml5 \
libqt5sql5 \
libssl1.1 \
moreutils \
net-tools \
@ -208,6 +209,9 @@ RUN echo "deb http://deb.debian.org/debian/ buster non-free" > /etc/apt/sources.
/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
ADD openvpn/ /etc/openvpn/

View File

@ -24,13 +24,15 @@ The container is available from the Docker registry and this is the simplest way
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/downloads/path/:/downloads \
-e "VPN_ENABLED=yes" \
-e "VPN_TYPE=wireguard" \
-e "LAN_NETWORK=192.168.0.0/24" \
-p 8080:8080 \
--cap-add NET_ADMIN \
--sysctl "net.ipv4.conf.all.src_valid_mark=1" \
--restart unless-stopped \
dyonr/qbittorrentvpn
```
@ -54,6 +56,7 @@ $ docker run --privileged -d \
|`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`||
|`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`|
|`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`|

View File

@ -21,18 +21,18 @@ else
export VPN_ENABLED="yes"
fi
export LEGACY_IPTABLES=$(echo "${LEGACY_IPTABLES,,}")
iptables_version=$(iptables -V)
echo "[INFO] The container is currently running ${iptables_version}." | ts '%Y-%m-%d %H:%M:%.S'
echo "[INFO] LEGACY_IPTABLES is set to '${LEGACY_IPTABLES}'" | ts '%Y-%m-%d %H:%M:%.S'
if [[ $LEGACY_IPTABLES == "1" || $LEGACY_IPTABLES == "true" || $LEGACY_IPTABLES == "yes" ]]; then
export LEGACY_IPTABLES=$(echo "${LEGACY_IPTABLES,,}")
iptables_version=$(iptables -V)
echo "[INFO] The container is currently running ${iptables_version}." | ts '%Y-%m-%d %H:%M:%.S'
echo "[INFO] LEGACY_IPTABLES is set to '${LEGACY_IPTABLES}'" | ts '%Y-%m-%d %H:%M:%.S'
if [[ $LEGACY_IPTABLES == "1" || $LEGACY_IPTABLES == "true" || $LEGACY_IPTABLES == "yes" ]]; then
echo "[INFO] Setting iptables to iptables (legacy)" | ts '%Y-%m-%d %H:%M:%.S'
update-alternatives --set iptables /usr/sbin/iptables-legacy
iptables_version=$(iptables -V)
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 version" | ts '%Y-%m-%d %H:%M:%.S'
fi
fi
if [[ $VPN_ENABLED == "1" || $VPN_ENABLED == "true" || $VPN_ENABLED == "yes" ]]; then
# Check if VPN_TYPE is set.