// updateAvailableWarnable is a Warnable that warns the user that an update is available.
varupdateAvailableWarnable=Register(&Warnable{
Code:"update-available",
Title:"Update available",
Severity:SeverityLow,
Text:func(argsArgs)string{
returnfmt.Sprintf("An update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update.",args[ArgCurrentVersion],args[ArgAvailableVersion])
},
})
// securityUpdateAvailableWarnable is a Warnable that warns the user that an important security update is available.
returnfmt.Sprintf("An urgent security update from version %s to %s is available. Run `tailscale update` or `tailscale set --auto-update` to update now.",args[ArgCurrentVersion],args[ArgAvailableVersion])
},
})
// unstableWarnable is a Warnable that warns the user that they are using an unstable version of Tailscale
// so they won't be surprised by all the issues that may arise.
varunstableWarnable=Register(&Warnable{
Code:"is-using-unstable-version",
Title:"Using an unstable version",
Severity:SeverityLow,
Text:StaticMessage("This is an unstable version of Tailscale meant for testing and development purposes: please report any bugs to Tailscale."),
})
// NetworkStatusWarnable is a Warnable that warns the user that the network is down.
varNetworkStatusWarnable=Register(&Warnable{
Code:"network-status",
Title:"Network down",
Severity:SeverityHigh,
Text:StaticMessage("Tailscale cannot connect because the network is down. (No network interface is up.)"),
ImpactsConnectivity:true,
})
// IPNStateWarnable is a Warnable that warns the user that Tailscale is stopped.
varIPNStateWarnable=Register(&Warnable{
Code:"wantrunning-false",
Title:"Not connected to Tailscale",
Severity:SeverityLow,
Text:StaticMessage("Tailscale is stopped."),
})
// localLogWarnable is a Warnable that warns the user that the local log is misconfigured.
varlocalLogWarnable=Register(&Warnable{
Code:"local-log-config-error",
Title:"Local log misconfiguration",
Severity:SeverityLow,
Text:func(argsArgs)string{
returnfmt.Sprintf("The local log is misconfigured: %v",args[ArgError])
},
})
// LoginStateWarnable is a Warnable that warns the user that they are logged out,
// and provides the last login error if available.
varLoginStateWarnable=Register(&Warnable{
Code:"login-state",
Title:"Logged out",
Severity:SeverityMedium,
Text:func(argsArgs)string{
ifargs[ArgError]!=""{
returnfmt.Sprintf("You are logged out. The last login error was: %v",args[ArgError])
}else{
return"You are logged out."
}
},
})
// notInMapPollWarnable is a Warnable that warns the user that they cannot connect to the control server.
varnotInMapPollWarnable=Register(&Warnable{
Code:"not-in-map-poll",
Title:"Cannot connect to control server",
Severity:SeverityMedium,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:StaticMessage("Cannot connect to the control server (not in map poll). Check your Internet connection."),
})
// noDERPHomeWarnable is a Warnable that warns the user that Tailscale doesn't have a home DERP.
varnoDERPHomeWarnable=Register(&Warnable{
Code:"no-derp-home",
Title:"No home relay server",
Severity:SeverityHigh,
DependsOn:[]*Warnable{NetworkStatusWarnable},
Text:StaticMessage("Tailscale could not connect to any relay server. Check your Internet connection."),
})
// noDERPConnectionWarnable is a Warnable that warns the user that Tailscale couldn't connect to a specific DERP server.
returnfmt.Sprintf("Tailscale could not connect to the '%s' relay server. Your Internet connection might be down, or the server might be temporarily unavailable.",n)
}else{
returnfmt.Sprintf("Tailscale could not connect to the relay server with ID '%s'. Your Internet connection might be down, or the server might be temporarily unavailable.",args[ArgDERPRegionID])
returnfmt.Sprintf("Tailscale hasn't heard from the '%s' relay server in %v. The server might be temporarily unavailable, or your Internet connection might be down.",n,args[ArgDuration])
}else{
returnfmt.Sprintf("Tailscale hasn't heard from the home relay server (region ID '%v') in %v. The server might be temporarily unavailable, or your Internet connection might be down.",args[ArgDERPRegionID],args[ArgDuration])