feat(wg-randomize): rotate qbittorrent-public gluetun VPN config
crontab entry for randomize script and docker restart vpn config file use Dockerfile to install scp
This commit is contained in:
1 parent
5b16ce7843
commit
e568f214bd
19 files changed
+208
-9
No files matched your search
@@ -12,7 +12,6 @@ services:
|
||||
- "55661:55661/udp"
|
||||
- "55661:55661/tcp"
|
||||
restart: "unless-stopped"
|
||||
|
||||
volumes:
|
||||
- "./10-torrent-init.sh:/custom-cont-init.d/10-torrent-init.sh:ro"
|
||||
- "./qbittorrent-private:/config"
|
||||
@@ -20,7 +19,8 @@ services:
|
||||
- "/torrent/qbittorrent-private/downloads:/downloads-private"
|
||||
- "/torrent/qbittorrent-private/torrents:/torrents"
|
||||
qbittorrent-public:
|
||||
image: "lscr.io/linuxserver/qbittorrent:5.2.3"
|
||||
# image: "lscr.io/linuxserver/qbittorrent:latest"
|
||||
build: qbittorrent-public/
|
||||
container_name: "qbittorrent-public"
|
||||
environment:
|
||||
- PGID=1000
|
||||
@@ -30,13 +30,19 @@ services:
|
||||
network_mode: "service:gluetun"
|
||||
depends_on:
|
||||
- gluetun
|
||||
# ports:
|
||||
# - 8082:8080 # qBittorrent WebUI
|
||||
# - 55662:55663
|
||||
# - 55662:55663/udp
|
||||
restart: "unless-stopped"
|
||||
volumes:
|
||||
- "./10-torrent-init.sh:/custom-cont-init.d/10-torrent-init.sh:ro"
|
||||
- "./qbittorrent-public:/config"
|
||||
- "/home/lucas/scripts/torrent:/hostscripts:ro"
|
||||
- "/torrent/qbittorrent-public/downloads:/downloads-public"
|
||||
- "/torrent/qbittorrent-public/buffer:/downloads-private"
|
||||
- "/torrent/qbittorrent-public/torrents:/torrents"
|
||||
- "/data/torrent:/downloads-special"
|
||||
gluetun:
|
||||
image: qmcgaw/gluetun:latest
|
||||
container_name: gluetun
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = dPZe8Jq3Hu0k07MDk+Y4+AS2XHSLYalyg91TSFXRYEA=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = at-vie.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = 6tOduT4iNbZyqKNzsSgDe/ckziO6101NPZwrnY5WpTk=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = bd-dac.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = d3ldwEjnFcbLwD1o8uC5xC3DaSNek8DGeTpOb/h/IE4=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = de-ber.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = LErFIOc3YBK1khnmwV+a6fBbYff2OS3h+wnIuOKZQTY=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = ec-uio.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = CsdrT+WfcMRPhrOWgZeHj9DQiQtJfYFci94K5ztjr2E=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = ee-tll.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = +nv/Z8I2VS0eRdZwkpQW3U9RmsboTz2MUF94jVg5w10=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = fi-hel.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = zPg3ZJ7OsztQ0CRSSvH5o2KVL1DYgDGW65DFwLsYwyw=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = gl-goh.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = TjYxodFNdGlefxnWqe9vWWJHnz3meYWWhiIJyU8rgg8=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = ie-dub.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = +dmGrWPM9NI3vQkZ9E7hMRKAJKYzd3YMXGq10sjbN0A=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = in-del.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = z2Ik8BG6XgosyYE/O4Vz4kiPTZyoWSlJvZtFeFlNclI=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = kh-pnh.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = c9EuAnWYvGUyFrzrV70Fph0onkFv2xe3Bc0gTCFuKRw=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = mt-mla.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = oUFRc+2emXgogDVWnJF4RAzr72PyafCzMVeQOgG92lY=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = se-sto.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = yPdmxOfzm06fotkt/dlaAiyxWPaWfCuDPaUljNx+c38=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = si-lju.prod.surfshark.com:51820
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
CONF_DIR="${1:?Usage: $0 <conf-directory>}"
|
||||
|
||||
# Pick a random .conf except wg0.conf
|
||||
random_conf=$(find "$CONF_DIR" -maxdepth 1 -type f -name "*.conf" ! -name "wg0.conf" | shuf -n1)
|
||||
|
||||
echo "Selected: $random_conf"
|
||||
|
||||
# Copy to wg0.conf in current directory
|
||||
cp "$random_conf" ./wg0.conf
|
||||
|
||||
# Resolve hostname in Endpoint to IP
|
||||
endpoint=$(grep '^Endpoint' wg0.conf | awk '{print $3}')
|
||||
host=${endpoint%:*}
|
||||
port=${endpoint##*:}
|
||||
|
||||
ip=$(getent ahostsv4 "$host" | awk '{print $1; exit}')
|
||||
|
||||
if [[ -z "$ip" ]]; then
|
||||
echo "Failed to resolve $host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "s|^Endpoint = .*|Endpoint = $ip:$port|" wg0.conf
|
||||
|
||||
echo "Updated Endpoint:"
|
||||
grep '^Endpoint' wg0.conf
|
||||
@@ -6,7 +6,6 @@ Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = dPZe8Jq3Hu0k07MDk+Y4+AS2XHSLYalyg91TSFXRYEA=
|
||||
PublicKey = zPg3ZJ7OsztQ0CRSSvH5o2KVL1DYgDGW65DFwLsYwyw=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = 87.249.133.4:51820
|
||||
|
||||
Endpoint = 92.62.123.85:51820
|
||||
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Use this configuration with WireGuard client
|
||||
#
|
||||
[Interface]
|
||||
Address = 10.14.0.2/16
|
||||
PrivateKey = mKeDQdxtM1iFJS7WLlb2jPGabZIt3NkoA/nGCcNOU1I=
|
||||
DNS = 162.252.172.57, 149.154.159.92
|
||||
[Peer]
|
||||
PublicKey = d3ldwEjnFcbLwD1o8uC5xC3DaSNek8DGeTpOb/h/IE4=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = 86.38.98.61:51820
|
||||
Reference in new issue
Block a user