mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
control/controlclient, localapi: shorten expiry time via localapi (#4112)
Signed-off-by: Nick O'Neill <nick@tailscale.com>
This commit is contained in:
@@ -3187,6 +3187,15 @@ func (b *LocalBackend) allowExitNodeDNSProxyToServeName(name string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// SetExpiry updates the expiry of the current node key to t, as long as it's
|
||||
// only sooner than the old expiry.
|
||||
//
|
||||
// If t is in the past, the key is expired immediately.
|
||||
// If t is after the current expiry, an error is returned.
|
||||
func (b *LocalBackend) SetExpirySooner(ctx context.Context, expiry time.Time) error {
|
||||
return b.cc.SetExpirySooner(ctx, expiry)
|
||||
}
|
||||
|
||||
// exitNodeCanProxyDNS reports the DoH base URL ("http://foo/dns-query") without query parameters
|
||||
// to exitNodeID's DoH service, if available.
|
||||
//
|
||||
|
@@ -223,6 +223,12 @@ func (cc *mockControl) Logout(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cc *mockControl) SetExpirySooner(context.Context, time.Time) error {
|
||||
cc.logf("SetExpirySooner")
|
||||
cc.called("SetExpirySooner")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cc *mockControl) SetPaused(paused bool) {
|
||||
cc.logf("SetPaused=%v", paused)
|
||||
if paused {
|
||||
|
Reference in New Issue
Block a user