wireguard protonvpn port auto-updater

master
meftimes 2023-12-05 18:40:26 -05:00
parent 41c0f6a376
commit 7ad2852d13
3 changed files with 34 additions and 12 deletions

View File

@ -1,2 +1,6 @@
WIREGUARD_PRIVATE_KEY=private_key_goes_here_see_https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/mullvad.md
WIREGUARD_ADDRESSES=addresses_go_here
VPN_ENDPOINT_IP=from-wireguard-conf-file
VPN_ENDPOINT_PORT=from-wireguard-conf-file
WIREGUARD_PUBLIC_KEY=from-wireguard-conf-file
WIREGUARD_PRIVATE_KEY=from-wireguard-conf-file
WIREGUARD_ADDRESSES=from-wireguard-conf-file

View File

@ -7,13 +7,12 @@ services:
cap_add:
- NET_ADMIN
ports:
- 40605:40605 # transmission
- 40605:40605/udp # transmission
- 3000:3000 # chromium
environment:
- VPN_SERVICE_PROVIDER=mullvad
- VPN_SERVICE_PROVIDER=custom
- VPN_TYPE=wireguard
- SERVER_CITIES=Toronto
- VPN_PORT_FORWARDING=on
- VPN_PORT_FORWARDING_PROVIDER=protonvpn
env_file:
- .env
restart: unless-stopped
@ -27,15 +26,10 @@ services:
- PUID=1001
- PGID=1001
- TZ=America/New_York
- PEERPORT=40605
volumes:
- /home/meftimes/docker/gluetun-transmission-chromium/transmission-config:/config
- /home/meftimes/docker/transmission/downloads:/downloads
- /home/meftimes/docker/gluetun-transmission-chromium/watch:/watch
# ports:
# - 9091:9091
# - 40605:40605
# - 40605:40605/udp
labels:
- "traefik.enable=true"
- "traefik.passHostHeader=true"
@ -51,7 +45,7 @@ services:
restart: unless-stopped
chromium:
image: linuxserver/chromium:latest
image: linuxserver/chromium
container_name: chromium
security_opt:
- seccomp:unconfined #optional

View File

@ -0,0 +1,24 @@
#!/bin/bash
#Requires systemd unit (transmission.service) to run on boot
#
#[Unit]
#Description=Script
#
#[Service]
#ExecStart=/usr/bin/transmission-port.sh
#User=meftimes
#Group=meftimes
#
#[Install]
#WantedBy=multi-user.target
# Make executable and move to /usr/bin/
sleep 10
docker stop transmission
sleep 10
sed -i "/\"peer-port\"/c\ \"peer-port\": $(docker exec gluetun cat /tmp/gluetun/forwarded_port)," /home/meftimes/docker/gluetun-transmission-chromium/transmission-config/settings.json
sleep 10
docker start transmission
sleep 10
docker restart chromium