add config field "IPsNATed" to listener, indicating the IPs are not the actual public IPs but are NATed, to skip a few DNS checks

the dns check was returning errors that could not be fixed with that setup,
which makes the checks much less useful.

for issue #17
This commit is contained in:
Mechiel Lukkien
2023-03-09 15:24:06 +01:00
parent 8b0706e02d
commit e6df84a8de
4 changed files with 48 additions and 19 deletions

View File

@ -870,6 +870,10 @@ func IPs(ctx context.Context) ([]net.IP, error) {
var ips []net.IP
var ipv4all, ipv6all bool
for _, l := range Conf.Static.Listeners {
// If NATed, we don't know our external IPs.
if l.IPsNATed {
return nil, nil
}
for _, s := range l.IPs {
ip := net.ParseIP(s)
if ip.IsUnspecified() {