qdm12 / gluetun

VPN client in a thin Docker container for multiple VPN providers, written in Go, and using OpenVPN or Wireguard, DNS over TLS, with a few proxy servers built-in.
https://hub.docker.com/r/qmcgaw/gluetun
MIT License
8.04k stars 371 forks source link

Bug: IP_STATUS_FILE and PORT_FORWARDING_STATUS_FILE not updated after restart command on the HTTP control server #173

Closed FlorentLM closed 4 years ago

FlorentLM commented 4 years ago

TLDR: IP_STATUS_FILE and PORT_FORWARDING_STATUS_FILE do not get updated after restart command issued through the http control server

  1. Is this urgent?

    • [x] Yes
    • [ ] No
  2. What VPN service provider are you using?

    • [x] PIA
    • [ ] Mullvad
    • [ ] Windscribe
    • [ ] Surfshark
  3. What's the version of the program?

    Running docker image with tag latest

  4. What are you using to run the container?

    • [ ] Docker run
    • [x] Docker Compose
    • [ ] Kubernetes
    • [ ] Docker stack
    • [ ] Docker swarm
    • [ ] Podman
    • [ ] Other:
  5. Extra information

Configuration file:

version: '2'

services:
  gluetun:
    image: qmcgaw/private-internet-access
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    network_mode: bridge
    ports:
      - 8888:8000/tcp

    environment:
      - VPNSP=private internet access
      - PROTOCOL=udp
      - OPENVPN_VERBOSITY=1
      - OPENVPN_ROOT=no
      - TZ=xxxxxxxxxxx

      # PIA
      - REGION=xxxxxxxxxxx
      - USER=xxxxxxxxxxx
      - PASSWORD=xxxxxxxxxxx
      - PIA_ENCRYPTION=strong
      - PORT_FORWARDING=on
      - PORT_FORWARDING_STATUS_FILE=/forwarded_port

      # Others
      - IP_STATUS_FILE=/ip
      - EXTRA_SUBNETS=192.168.1.0/24

      - SHADOWSOCKS=off
      - TINYPROXY=off

    volumes:
      - /home/xxxxxxxxxxx/xxxxxxxxxxx/gluetun/ip:/ip
      - /home/xxxxxxxxxxx/xxxxxxxxxxx/gluetun/forwarded_port:/forwarded_port

    restart: always

Host OS: Debian

qdm12 commented 4 years ago

Indeed, thanks! I'll fix it tonight.

FlorentLM commented 4 years ago

Awesome, thanks :)

qdm12 commented 4 years ago

It should now redo the initial procedure (except dns over tls) whenever an Initialization sequence completed is encountered, instead of just on the first occurrence. I haven't got the time to test it thoroughly, but it should do the job.

Feel free to comment if it doesn't work. Enjoy!