ChainSafe / ChainSafe/gossamer
Try different public IP address echo services
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Issue summary
When running gossamer at the airport, `https://shtuff.it/myip/short` was DNS blocked.
```
WARN[11-05|18:56:30] Bootstrap is enabled but no bootstrap nodes are defined pkg=network caller=config.go:144
EROR[11-05|18:56:33] failed to get public IP pkg=network error="Results are not identical: [208.94.110.98 208.94.110.98 208.94.110.98 207.164.135.99 208.94.110.98 207.164.135.99 207.164.135.99 207.164.135.99 207.164.135.99 207.164.135.99 208.94.110.98 207.164.135.99]\nFailed to reach https://shtuff.it/myip/short" caller=host.go:79
```
We should try a few of them (e.g. https://ipinfo.io/ip) before giving up. That would be good also in case shtuff.it goes down temporarily, we should not rely on a single source. We could also use DNS packets to google or cloudflare to get our IP address echoed back, I have an implementation at https://github.com/qdm12/ddns-updater/tree/master/pkg/publicip/dns if we want extra fanciness. But probably not though :smile:
Contributor guide
Assessment
This issue has not been assessed yet.