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
6.71k stars 331 forks source link

Bug: Server Updater overwrites custom servers.json file #2229

Closed jdeck002 closed 2 months ago

jdeck002 commented 2 months ago

Is this urgent?

Yes

Host OS

No response

CPU arch

x86_64

VPN service provider

VPNSecure.me

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2024-04-08T07:43:05.096Z (commit 7b4befc)

What's the problem 🤔

Server Updater overwrites my custom servers.json.

I use VPNsecure.Me and the servers in the built in server list (https://raw.githubusercontent.com/qdm12/gluetun/master/internal/storage/servers.json) are out of date. I have a custom configuration file with the updated IP addresses of the servers I would like to use. When the container is created, or the periodic update is run, instead of "merging" the two files, the Updater completely overwrites my custom servers.json file and my VPN connection is never successful.

Share your logs (at least 10 lines)

2024-04-18T05:05:32.236748176Z 2024-04-17T22:05:32-07:00 INFO [healthcheck] 👉 See https://github.com/qdm12/gluetun-wiki/blob/main/faq/healthcheck.md
2024-04-18T05:05:32.236757639Z 2024-04-17T22:05:32-07:00 INFO [healthcheck] DO NOT OPEN AN ISSUE UNLESS YOU READ AND TRIED EACH POSSIBLE SOLUTION
2024-04-18T05:05:32.236764834Z 2024-04-17T22:05:32-07:00 INFO [vpn] stopping
2024-04-18T05:05:32.237925139Z 2024-04-17T22:05:32-07:00 INFO [vpn] starting
2024-04-18T05:05:32.238457543Z 2024-04-17T22:05:32-07:00 INFO [firewall] allowing VPN connection...
2024-04-18T05:05:32.313332337Z 2024-04-17T22:05:32-07:00 WARN [openvpn] Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2024-04-18T05:05:32.315707882Z 2024-04-17T22:05:32-07:00 INFO [openvpn] OpenVPN 2.5.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov  2 2022
2024-04-18T05:05:32.315752852Z 2024-04-17T22:05:32-07:00 INFO [openvpn] library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2024-04-18T05:05:32.324189400Z 2024-04-17T22:05:32-07:00 INFO [openvpn] TCP/UDP: Preserving recently used remote address: [AF_INET]135.148.27.95:1282
2024-04-18T05:05:32.324224914Z 2024-04-17T22:05:32-07:00 INFO [openvpn] UDP link local: (not bound)
2024-04-18T05:05:32.324264831Z 2024-04-17T22:05:32-07:00 INFO [openvpn] UDP link remote: [AF_INET]135.148.27.95:1282
2024-04-18T05:06:08.410467011Z 2024-04-17T22:06:08-07:00 INFO [healthcheck] program has been unhealthy for 36s: restarting VPN

Share your configuration

gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped
    networks:
      - t2_proxy
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    ports:
      - "9091:9091" # Exposing Transmisison through Docker Host LAN IP
      - "51413:51413"
      - "51413:51413/udp"
    # #   - 8888:8888/tcp # HTTP proxy
    # #   - 8388:8388/tcp # Shadowsocks
    # #   - 8388:8388/udp # Shadowsocks
    volumes:
      - $DOCKERDIR/appdata/gluetun:/gluetun
    environment:
      - TZ=$TZ
      # OpenVPN
      - VPN_SERVICE_PROVIDER=vpnsecure
      - OPENVPN_KEY_PASSPHRASE=$OPENVPN_PASSWORD
      - SERVER_COUNTRIES=United States
      # - SERVER_REGIONS=California
      # - SERVER_CITIES=Los Angeles
      # - UPDATER_PERIOD=3m
    labels:
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.gluetun-transmission-rtr.entrypoints=https"
      - "traefik.http.routers.gluetun-transmission-rtr.rule=Host(`trans.$DOMAINNAME`)" # transmisison
      ## Middlewares
      #      - "traefik.http.routers.gluetun-qbittorrent-rtr.middlewares=chain-basic-auth@file" # qBittorrent
      ## Services
      - "traefik.http.routers.gluetun-transmission-rtr.service=gluetun-svc-trans" # transmission
      - "traefik.http.services.gluetun-svc-trans.loadbalancer.server.port=9091" # transmission
github-actions[bot] commented 2 months ago

@qdm12 is more or less the only maintainer of this project and works on it in his free time. Please:

qdm12 commented 2 months ago

the periodic update is run

This should update cleanly all servers data, is there anything wrong with it?

You can also update the servers data following https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-using-the-command-line

Ideally, don't fiddle manually with the servers.json file.

qdm12 commented 2 months ago

This might be related to #2226 and #2206

qdm12 commented 2 months ago

Please subscribe to #2206 to be notified when the update mechanism is fixed (probably tomorrow I think), and this should resolve your problem (in case you had this problem). Regarding the server updater, it is meant to override your persisted servers.json since the information it just obtained is more recent and should be used instead.

github-actions[bot] commented 2 months ago

Closed issues are NOT monitored, so commenting here is likely to be not seen. If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project which became too popular to monitor issues closed.