|
|
@ -1543,24 +1543,17 @@ func (b *LocalBackend) loadStateLocked(key ipn.StateKey, prefs *ipn.Prefs) (err
|
|
|
|
return fmt.Errorf("PrefsFromBytes: %v", err)
|
|
|
|
return fmt.Errorf("PrefsFromBytes: %v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// On mobile platforms, ignore any old stored preferences for
|
|
|
|
// Ignore any old stored preferences for https://login.tailscale.com
|
|
|
|
// https://login.tailscale.com as the control server that
|
|
|
|
// as the control server that would override the new default of
|
|
|
|
// would override the new default of controlplane.tailscale.com.
|
|
|
|
// controlplane.tailscale.com.
|
|
|
|
// This makes sure that mobile clients go through the new
|
|
|
|
// This makes sure that mobile clients go through the new
|
|
|
|
// frontends where we're (2021-10-02) doing battery
|
|
|
|
// frontends where we're (2021-10-02) doing battery
|
|
|
|
// optimization work ahead of turning down the old backends.
|
|
|
|
// optimization work ahead of turning down the old backends.
|
|
|
|
// TODO(bradfitz): make this the default for all platforms
|
|
|
|
|
|
|
|
// later. But mobile is a relatively small chunk (compared to
|
|
|
|
|
|
|
|
// Linux, Windows, macOS) and moving mobile early for battery
|
|
|
|
|
|
|
|
// gains is nice.
|
|
|
|
|
|
|
|
switch runtime.GOOS {
|
|
|
|
|
|
|
|
case "android", "ios":
|
|
|
|
|
|
|
|
if b.prefs != nil && b.prefs.ControlURL != "" &&
|
|
|
|
if b.prefs != nil && b.prefs.ControlURL != "" &&
|
|
|
|
b.prefs.ControlURL != ipn.DefaultControlURL &&
|
|
|
|
b.prefs.ControlURL != ipn.DefaultControlURL &&
|
|
|
|
ipn.IsLoginServerSynonym(b.prefs.ControlURL) {
|
|
|
|
ipn.IsLoginServerSynonym(b.prefs.ControlURL) {
|
|
|
|
b.prefs.ControlURL = ""
|
|
|
|
b.prefs.ControlURL = ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
b.logf("using backend prefs for %q: %s", key, b.prefs.Pretty())
|
|
|
|
b.logf("using backend prefs for %q: %s", key, b.prefs.Pretty())
|
|
|
|
|
|
|
|
|
|
|
|