gluetun
gluetun copied to clipboard
Feature request: retry logic for fetching the public ip information
Is this urgent?
No
Host OS
Ubuntu 22.04.4 LTS
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-06-17T22:37:52.988Z (commit 93ed87d)
What's the problem 🤔
The publicip endpoint is no longer functional:
# curl localhost:8000/v1/publicip/ip
{"public_ip":""}
I discovered this just recently. I have a control wrapper/application which does a regular automated request against that endpoint and stores the results.
I'm near certain, this is due to this commit: https://github.com/qdm12/gluetun/commit/4218dba177674f4a9e8ac98f98fc5ee0da4f4ccc
Again, I wish my Go skills and knowledge were better so that I might be able to offer an option.
With my configuration I'm running DNS (blocky) with gluetun (network_mode: "service:gluetun"
) so I don't expect the initial dns request to succeed. However, it would be nice if there were a latter request which would make the public address available.
I did a quick test against gluetun:v3
and found this was not the case with this release. I also applied the optional PUBLICIP_API=ip2location
with both gluetun:v3
and gluetun:latest
and found the issue consistent only with the more recent release.
Share your logs (at least 10 lines)
...
2024-06-19T07:25:33-07:00 INFO [wireguard] Wireguard setup is complete. Note Wireguard is a silent protocol and it may or may not work, without giving any error message. Typically i/o timeout errors indicate the Wireguard connection is not working.
2024-06-19T07:25:33-07:00 ERROR [vpn] getting public IP address information: fetching information: Get "https://api.ip2location.io/": dial tcp: lookup api.ip2location.io on 127.0.0.1:53: read udp 127.0.0.1:36706->127.0.0.1:53: read: connection refused
2024-06-19T07:25:33-07:00 ERROR [vpn] cannot get version information: Get "https://api.github.com/repos/qdm12/gluetun/commits": dial tcp: lookup api.github.com on 127.0.0.1:53: read udp 127.0.0.1:52976->127.0.0.1:53: read: connection refused
2024-06-19T07:25:35-07:00 INFO [healthcheck] healthy!
...
### Share your configuration
_No response_