mirror of
https://github.com/tailscale/tailscale.git
synced 2025-09-24 23:21:02 +02:00
As of this commit (per the issue), the Taildrive code remains where it was, but in new files that are protected by the new ts_omit_drive build tag. Future commits will move it. Updates #17058 Change-Id: Idf0a51db59e41ae8da6ea2b11d238aefc48b219e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// This is the Taildrive stuff that should ideally be registered in init only when
|
|
// the ts_omit_drive is not set, but for transition reasons is currently (2025-09-08)
|
|
// always defined, as we work to pull it out of LocalBackend.
|
|
|
|
package ipnlocal
|
|
|
|
import "tailscale.com/tailcfg"
|
|
|
|
const (
|
|
// DriveLocalPort is the port on which the Taildrive listens for location
|
|
// connections on quad 100.
|
|
DriveLocalPort = 8080
|
|
)
|
|
|
|
// DriveSharingEnabled reports whether sharing to remote nodes via Taildrive is
|
|
// enabled. This is currently based on checking for the drive:share node
|
|
// attribute.
|
|
func (b *LocalBackend) DriveSharingEnabled() bool {
|
|
return b.currentNode().SelfHasCap(tailcfg.NodeAttrsTaildriveShare)
|
|
}
|
|
|
|
// DriveAccessEnabled reports whether accessing Taildrive shares on remote nodes
|
|
// is enabled. This is currently based on checking for the drive:access node
|
|
// attribute.
|
|
func (b *LocalBackend) DriveAccessEnabled() bool {
|
|
return b.currentNode().SelfHasCap(tailcfg.NodeAttrsTaildriveAccess)
|
|
}
|