Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Custom OpenVPN with config file not working #2656

Open
sriyan-a opened this issue Jan 11, 2025 · 1 comment
Open

Bug: Custom OpenVPN with config file not working #2656

sriyan-a opened this issue Jan 11, 2025 · 1 comment

Comments

@sriyan-a
Copy link

sriyan-a commented Jan 11, 2025

Is this urgent?

Yes

Host OS

Debian | OpenMediaVault

CPU arch

x86_64

VPN service provider

Custom

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2024-12-27T20:18:46.989Z (commit 61b053f)

What's the problem 🤔

I am using VPN provider (Hotspot Shield) which is not one of the readily supported providers. But I followed the instructions in this wiki to set up gluetun with a openvpn config file+username+password.

I see from the logs that glueton is not able to find any region and/or country for VPN_SERVICE_PROVIDER=custom as asked for in the wiki. I checked this file and I don't see a custom key in the json but I see all the other providers, which this could possibly be the issue?

Share your logs (at least 10 lines)

gluetun  | Running version latest built on 2024-12-27T20:18:46.989Z (commit 61b053f)
gluetun  | 
gluetun  | 🔧 Need help? ☕ Discussion? https://github.com/qdm12/gluetun/discussions/new/choose
gluetun  | 🐛 Bug? ✨ New feature? https://github.com/qdm12/gluetun/issues/new/choose
gluetun  | 💻 Email? [email protected]
gluetun  | 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
gluetun  | 2025-01-10T21:43:36-08:00 INFO [routing] default route found: interface eth0, gateway 172.28.10.1, assigned IP 172.28.10.2 and family v4
gluetun  | 2025-01-10T21:43:36-08:00 INFO [routing] local ethernet link found: eth0
gluetun  | 2025-01-10T21:43:36-08:00 INFO [routing] local ipnet found: 172.28.10.0/24
gluetun  | 2025-01-10T21:43:36-08:00 INFO [firewall] enabling...
gluetun  | 2025-01-10T21:43:36-08:00 INFO [firewall] enabled successfully
gluetun  | 2025-01-10T21:43:38-08:00 INFO [storage] merging by most recent 20776 hardcoded servers and 20776 servers read from /gluetun/servers.json
gluetun  | 2025-01-10T21:43:38-08:00 ERROR VPN settings: provider settings: server selection: for VPN service provider custom: the region specified is not valid: one or more values is set but there is no possible value available
gluetun  | 2025-01-10T21:43:38-08:00 INFO Shutdown successful

Share your configuration

networks:
  mediastack:
    name: mediastack
    driver: bridge
    ipam:
      driver: default
      config:
      - subnet: ${DOCKER_SUBNET:?err}
        gateway: ${DOCKER_GATEWAY:?err}

services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - "8888:8888/tcp"                         # Gluetun Local Network HTTP proxy
      - "8388:8388/tcp"                         # Gluetun Local Network Shadowsocks
      - "8388:8388/udp"                         # Gluetun Local Network Shadowsocks
      - ${GLUETUN_CONTROL_PORT:?err}:${GLUETUN_CONTROL_PORT:?err} # Gluetun Status Port
      - "${WEBUI_PORT_FIREFOX:?err}:3003"      # WebUI Portal: Firefox

    volumes:
      - ${FOLDER_FOR_DATA:?err}/gluetun:/gluetun
    environment:
      - PUID=${PUID:?err}
      - PGID=${PGID:?err}
      - UMASK=${UMASK:?err}
      - TZ=${TIMEZONE:?err}
      - VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER:?err}
      - OPENVPN_USER=${VPN_USERNAME:?err}
      - OPENVPN_PASSWORD=${VPN_PASSWORD:?err}
      - SERVER_REGIONS=${SERVER_REGIONS}
      - OPENVPN_CUSTOM_CONFIG=${OPENVPN_CUSTOM_CONFIG}
      - VPN_TYPE=${VPN_TYPE}
      - HTTPPROXY=on
      - SHADOWSOCKS=on
    networks:
      - mediastack

  firefox:
    image: lscr.io/linuxserver/firefox:latest
    container_name: firefox
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=${PUID:?err}
      - PGID=${PGID:?err}
      - TZ=${TIMEZONE:?err}
      - HTTP_PROXY=http://localhost:8888 # Set the HTTP proxy to Gluetun
      - HTTPS_PROXY=http://localhost:8888 # Set the HTTPS proxy to Gluetun
    network_mode: "service:gluetun"
    volumes:
      - ${FOLDER_FOR_DATA:?err}/firefox/configs:/config:rw
      - ${FOLDER_FOR_DATA:?err}/firefox/downloads:/downloads:rw
    shm_size: "1gb"
    restart: unless-stopped

Env variables

DOCKER_SUBNET=172.28.10.0/24
DOCKER_GATEWAY=172.28.10.1

GLUETUN_CONTROL_PORT=8320
WEBUI_PORT_FIREFOX=3003

PUID=1002
PGID=1002
UMASK=0002
TIMEZONE=America/Los_Angeles

VPN_TYPE=openvpn
VPN_SERVICE_PROVIDER=custom
VPN_USERNAME=****
VPN_PASSWORD=****
OPENVPN_CUSTOM_CONFIG=/path/to/openvpn/config/hotspotshield_config.ovpn

SERVER_REGIONS=United States

FOLDER_FOR_DATA=/path/to/configs
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant