Make online status checking SPN aware

This commit is contained in:
Daniel
2021-10-19 10:26:28 +02:00
parent b9b33ed2b3
commit 0addff9449

View File

@@ -42,6 +42,8 @@ var (
DNSFallbackTestDomain = "dns-check.safing.io."
DNSFallbackTestExpectedIP = net.IPv4(0, 65, 67, 75) // Ascii: \0ACK
ConnectedToSPN = abool.New()
// SpecialCaptivePortalDomain is the domain name used to point to the detected captive portal IP
// or the captive portal test IP. The default value should be overridden by the resolver package,
// which defines the custom internal domain name to use.
@@ -350,6 +352,12 @@ func checkOnlineStatus(ctx context.Context) {
return StatusUnknown
}*/
// 0) check if connected to SPN
if ConnectedToSPN.IsSet() {
updateOnlineStatus(StatusOnline, nil, "connected to SPN")
}
// 1) check for addresses
ipv4, ipv6, err := GetAssignedAddresses()