diff --git a/torrents/config/01-natpmp-install b/torrents/config/01-natpmp-install deleted file mode 100755 index 4120264..0000000 --- a/torrents/config/01-natpmp-install +++ /dev/null @@ -1,8 +0,0 @@ -#!/command/with-contenv bash - -echo "Installing Git..." -apk add -u git - -echo "Installing py-natpmp" -rm -r /py-natpmp || echo "py-natpmp clean" -git clone https://github.com/yimingliu/py-natpmp.git /py-natpmp diff --git a/torrents/config/98-gateway-setup b/torrents/config/98-gateway-setup index b9236eb..0452b67 100755 --- a/torrents/config/98-gateway-setup +++ b/torrents/config/98-gateway-setup @@ -1,16 +1,4 @@ #!/command/with-contenv bash - -echo "Obtaining Wireguard Server IP..." -wgserver=$(grep Endpoint "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}') -echo "IP: ${wgserver%:*}" - -echo "Obtaining default gateway..." -gateway=$(ip -o -4 route show to default | awk '{print $3}') -echo "Gateway: ${gateway}" - -echo "Adding route to Wireguard Server via Default Gateway" -ip route add ${wgserver%:*}/32 via ${gateway} dev eth0 - echo "Allow DNS resolution locally" iptables -A INPUT -i eth0 -p udp -m udp --sport 53 -j ACCEPT iptables -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT diff --git a/torrents/config/setPortForward b/torrents/config/setPortForward deleted file mode 100755 index 0b16e1a..0000000 --- a/torrents/config/setPortForward +++ /dev/null @@ -1,3 +0,0 @@ -#!/command/with-contenv bash -listen_port=$(python3 /py-natpmp/natpmp/natpmp_client.py -g 10.2.0.1 0 0 | sed -E 's/.*?public port ([0-9]+).*?/\1/') -curl -F "json={\"listen_port\": ${listen_port}}" http://localhost:8080/api/v2/app/setPreferences diff --git a/torrents/docker-compose.yml b/torrents/docker-compose.yml index 1f6cc15..36007de 100644 --- a/torrents/docker-compose.yml +++ b/torrents/docker-compose.yml @@ -10,6 +10,7 @@ services: PGID: ${NASCOMPOSE_GID?} VPN_ENABLED: true VPN_LAN_NETWORK: 192.168.0.0/23 + VPN_PROVIDER: ${TORRENT_VPN?} cap_add: - NET_ADMIN sysctls: @@ -26,10 +27,8 @@ services: - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/volumes/qbittorrent_config/:/config/ - ${NASCOMPOSE_DATA?}/torrents${TORRENT_SUFFIX?}/:/data/torrents/ # Configuration - - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/01-natpmp-install:/etc/cont-init.d/01-natpmp-install:ro - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/98-gateway-setup:/etc/cont-init.d/98-gateway-setup:ro - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/99-cron-start:/etc/cont-init.d/99-cron-start:ro - - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/setPortForward:/etc/periodic/1min/setPortForward:ro - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/updateMaMIP:/etc/periodic/hourly/updateMaMIP:ro # Secrets - ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/secrets/wg0.conf:/config/wireguard/wg0.conf:ro