mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
cmd/tailscale,net/netcheck: add debug feature to force preferred DERP
This provides an interface for a user to force a preferred DERP outcome for all future netchecks that will take precedence unless the forced region is unreachable. The option does not persist and will be lost when the daemon restarts. Updates tailscale/corp#18997 Updates tailscale/corp#24755 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:

committed by
James Tucker

parent
74069774be
commit
7f9ebc0a83
@@ -2920,6 +2920,12 @@ func (b *LocalBackend) DebugPickNewDERP() error {
|
||||
return b.sys.MagicSock.Get().DebugPickNewDERP()
|
||||
}
|
||||
|
||||
// DebugForcePreferDERP forwards to netcheck.DebugForcePreferDERP.
|
||||
// See its docs.
|
||||
func (b *LocalBackend) DebugForcePreferDERP(n int) {
|
||||
b.sys.MagicSock.Get().DebugForcePreferDERP(n)
|
||||
}
|
||||
|
||||
// send delivers n to the connected frontend and any API watchers from
|
||||
// LocalBackend.WatchNotifications (via the LocalAPI).
|
||||
//
|
||||
|
Reference in New Issue
Block a user