arr: Use gluetun port forward feature
Explanation here: https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/vpn-port-forwarding.md Whenever we receive a new forwarded port (around once a month?) we pass it to qbit through its API. May require the setting no auth for local connections in qbit. Allows to remove the complete port-manager docker container which did not work very well.
This commit is contained in:
parent
4658ff5d7e
commit
06940925a9
1 changed files with 1 additions and 39 deletions
|
|
@ -160,6 +160,7 @@ services:
|
|||
- PORT_FORWARD_ONLY=true
|
||||
- VPN_PORT_FORWARDING=on
|
||||
- VPN_PORT_FORWARDING_PROVIDER={{ arrstack_vpn_provider }}
|
||||
- VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{ '{{' }}PORTS{{ '}}' }} }" http://127.0.0.1:8888/api/v2/app/setPreferences 2>&1'
|
||||
- QBITTORRENT_USER={{ arrstack_qbit_user }}
|
||||
- QBITTORRENT_PASS={{ arrstack_qbit_pass }}
|
||||
cap_add:
|
||||
|
|
@ -168,8 +169,6 @@ services:
|
|||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- "{{ arrstack_env_dir }}/config/gluetun:/gluetun"
|
||||
#ports: # TODO: should this be exposed?
|
||||
# - 8000:8000 # gluetun http control
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
caddy: "{{ arrstack_qbit_subdomain }}"
|
||||
|
|
@ -191,43 +190,6 @@ services:
|
|||
- vpn
|
||||
network_mode: "service:vpn"
|
||||
restart: unless-stopped
|
||||
gluetun-qbittorrent-port-manager:
|
||||
image: patrickaclark/gluetun-qbittorrent-port-manager:latest
|
||||
container_name: qbit-port-manager
|
||||
environment:
|
||||
- PUID={{ arrstack_puid }}
|
||||
- PGID={{ arrstack_pgid }}
|
||||
- TZ={{ arrstack_tz }}
|
||||
- UMASK_SET={{ arrstack_umask_set }}
|
||||
- WEBUI_PORT=8888
|
||||
- QBITTORRENT_SERVER=qbittorrent # IP Address of qbittorrent
|
||||
- QBITTORRENT_PORT=8888
|
||||
- PORT_FORWARDED=/gluetun/forwarded_port
|
||||
- HTTP_S=http # Select 'http' or 'https' depending on if you use certificates.
|
||||
- GLUETUN_HOST=vpn # IP or FQDN of gluetun control server
|
||||
- GLUETUN_PORT=8000 # port of gluetun control server
|
||||
- RECHECK_TIME=60 # number of seconds between checks to gluetun server for port
|
||||
- VPN_SERVICE_PROVIDER={{ arrstack_vpn_provider }}
|
||||
- OPENVPN_USER={{ arrstack_vpn_user }}
|
||||
- OPENVPN_PASSWORD={{ arrstack_vpn_pass }}
|
||||
- SERVER_REGIONS={{ arrstack_vpn_regions }}
|
||||
- PORT_FORWARD_ONLY=true
|
||||
- VPN_PORT_FORWARDING=on
|
||||
- VPN_PORT_FORWARDING_PROVIDER={{ arrstack_vpn_provider }}
|
||||
- QBITTORRENT_USER={{ arrstack_qbit_user }}
|
||||
- QBITTORRENT_PASS={{ arrstack_qbit_pass }}
|
||||
volumes:
|
||||
- "{{ arrstack_env_dir }}/config/gluetun:/gluetun"
|
||||
depends_on:
|
||||
- vpn
|
||||
network_mode: "service:vpn"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-H", "Authorization: $controlServerAuthKey", "-s", "http://localhost:8000/v1/openvpn/status", "|", "grep", "-q", '{"status":"running"}']
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
start_period: 60s
|
||||
retries: 3
|
||||
|
||||
homarr:
|
||||
image: ghcr.io/ajnart/homarr:latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue