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
7.35k stars 349 forks source link

Bug: "the hostname specified is not valid" when using custom wireguard vpn. #2042

Closed Kuinox closed 2 weeks ago

Kuinox commented 8 months ago

Is this urgent?

No

Host OS

TrueNAS

CPU arch

x86_64

VPN service provider

Custom

What are you using to run the container

Kubernetes

What is the version of Gluetun

Running version v3.36.0 built on 2023-10-31T13:10:39.622Z (commit 1c43a1d)

What's the problem 🤔

It seems that there is no way to use an hostname when setting up a custom wireguard config, I'm forced to enter an IP.
The docs on custom wireguard config doesn't show a way to setup up an hostname endpoint either.

Share your logs (at least 10 lines)

2024-01-11 16:01:12.226081+01:00💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
2024-01-11 16:01:12.226445+01:002024-01-11T16:01:12+01:00 INFO [routing] default route found: interface eth0, gateway 172.16.0.1, assigned IP 172.16.1.3 and family v4
2024-01-11 16:01:12.226483+01:002024-01-11T16:01:12+01:00 INFO [routing] local ethernet link found: eth0
2024-01-11 16:01:12.226530+01:002024-01-11T16:01:12+01:00 INFO [routing] local ipnet found: 172.16.0.0/16
2024-01-11 16:01:12.226582+01:002024-01-11T16:01:12+01:00 INFO [routing] local ipnet found: fe80::/64
2024-01-11 16:01:22.308412+01:002024-01-11T16:01:22+01:00 INFO [firewall] enabling...
2024-01-11 16:01:22.436107+01:002024-01-11T16:01:22+01:00 INFO [firewall] enabled successfully
2024-01-11 16:01:22.689221+01:002024-01-11T16:01:22+01:00 INFO [storage] creating /gluetun/servers.json with 17689 hardcoded servers
2024-01-11 16:01:22.753753+01:002024-01-11T16:01:22+01:00 ERROR VPN settings: provider settings: server selection: for VPN service provider custom: the hostname specified is not valid: one or more values is set but there is no possible value available
2024-01-11 16:01:22.753815+01:002024-01-11T16:01:22+01:00 INFO Shutdown successful

### Share your configuration

```yml
Using truenas qbittorrent app with gluetun as addons, with the following env variables:  
VPN_SERVICE_PROVIDER=custom
VPN_TYPE=wireguard
SERVER_HOSTNAMES=engage.cloudflareclient.com
VPN_ENDPOINT_PORT=2408
WIREGUARD_PUBLIC_KEY=REDACTED
WIREGUARD_PRIVATE_KEY=REDACTED
WIREGUARD_ADDRESSES=172.16.0.2/32
Canopus20 commented 5 months ago

I am also facing the same problem and can't use the hostname (like engage.cloudflareclient.com). The custom mode seems to only accept IP addresses and with WARP, it doesn't work.

DarkVader-cell commented 1 month ago

True, this is still an issue as of July 2024, the only option is to manually update the IP once in a while when it stops working or a little script that could probably update the docker compose in a scheduled manner.

qdm12 commented 2 weeks ago

Duplicate of #788 - please subscribe to that one.

This is by design, see https://github.com/qdm12/gluetun-wiki/blob/main/faq/others.md#server-information I'm working on a solution with a 'very restricted networking' when the VPN is down, but... not there yet.

github-actions[bot] commented 2 weeks 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.