summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCharlotte Brandhorst-Satzkorn <46385858+catzkorn@users.noreply.github.com>2024-04-02 14:09:23 -0700
committerCharlotte Brandhorst-Satzkorn <charlotte@tailscale.com>2024-04-02 14:11:42 -0700
commit589f58b4d0bf239361eb3c7e6ba8ebae1ff2bc95 (patch)
tree398c6726115fb2ef5540b32097d4ea9433770f2e
parent14683371ee6c00ab3c15d42741113f91e4c44946 (diff)
downloadtailscale-revert-11590-catzkorn/penguin.tar.xz
tailscale-revert-11590-catzkorn/penguin.zip
Revert "tailscale: update tailfs file and package names (#11590)"revert-11590-catzkorn/penguin
This reverts commit 14683371ee6c00ab3c15d42741113f91e4c44946. Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
-rw-r--r--client/tailscale/localclient.go8
-rw-r--r--client/tailscale/localclient_test.go6
-rw-r--r--cmd/derper/depaware.txt2
-rw-r--r--cmd/tailscale/cli/share.go6
-rw-r--r--cmd/tailscale/depaware.txt2
-rw-r--r--cmd/tailscaled/depaware.txt16
-rw-r--r--cmd/tailscaled/tailscaled.go8
-rw-r--r--cmd/tailscaled/tailscaled_windows.go4
-rw-r--r--ipn/backend.go4
-rw-r--r--ipn/ipn_clone.go6
-rw-r--r--ipn/ipn_view.go8
-rw-r--r--ipn/ipnlocal/local.go6
-rw-r--r--ipn/ipnlocal/local_test.go60
-rw-r--r--ipn/ipnlocal/peerapi.go4
-rw-r--r--ipn/ipnlocal/tailfs.go (renamed from ipn/ipnlocal/drive.go)40
-rw-r--r--ipn/ipnlocal/tailfs_test.go (renamed from ipn/ipnlocal/drive_test.go)0
-rw-r--r--ipn/localapi/localapi.go6
-rw-r--r--ipn/prefs.go6
-rw-r--r--tailcfg/tailcfg_test.go6
-rw-r--r--tailfs/local.go (renamed from drive/local.go)12
-rw-r--r--tailfs/remote.go (renamed from drive/remote.go)2
-rw-r--r--tailfs/remote_nonunix.go (renamed from drive/remote_nonunix.go)2
-rw-r--r--tailfs/remote_permissions.go (renamed from drive/remote_permissions.go)2
-rw-r--r--tailfs/remote_permissions_test.go (renamed from drive/remote_permissions_test.go)2
-rw-r--r--tailfs/remote_unix.go (renamed from drive/remote_unix.go)2
-rw-r--r--tailfs/tailfs_clone.go (renamed from drive/drive_clone.go)2
-rw-r--r--tailfs/tailfs_view.go (renamed from drive/drive_view.go)2
-rw-r--r--tailfs/tailfsimpl/birthtiming.go (renamed from drive/driveimpl/birthtiming.go)2
-rw-r--r--tailfs/tailfsimpl/birthtiming_test.go (renamed from drive/driveimpl/birthtiming_test.go)2
-rw-r--r--tailfs/tailfsimpl/compositedav/compositedav.go (renamed from drive/driveimpl/compositedav/compositedav.go)4
-rw-r--r--tailfs/tailfsimpl/compositedav/propfind.go (renamed from drive/driveimpl/compositedav/propfind.go)2
-rw-r--r--tailfs/tailfsimpl/compositedav/stat_cache.go (renamed from drive/driveimpl/compositedav/stat_cache.go)0
-rw-r--r--tailfs/tailfsimpl/compositedav/stat_cache_test.go (renamed from drive/driveimpl/compositedav/stat_cache_test.go)0
-rw-r--r--tailfs/tailfsimpl/connlistener.go (renamed from drive/driveimpl/connlistener.go)2
-rw-r--r--tailfs/tailfsimpl/connlistener_test.go (renamed from drive/driveimpl/connlistener_test.go)2
-rw-r--r--tailfs/tailfsimpl/dirfs/dirfs.go (renamed from drive/driveimpl/dirfs/dirfs.go)2
-rw-r--r--tailfs/tailfsimpl/dirfs/dirfs_test.go (renamed from drive/driveimpl/dirfs/dirfs_test.go)2
-rw-r--r--tailfs/tailfsimpl/dirfs/mkdir.go (renamed from drive/driveimpl/dirfs/mkdir.go)2
-rw-r--r--tailfs/tailfsimpl/dirfs/openfile.go (renamed from drive/driveimpl/dirfs/openfile.go)2
-rw-r--r--tailfs/tailfsimpl/dirfs/removeall.go (renamed from drive/driveimpl/dirfs/removeall.go)0
-rw-r--r--tailfs/tailfsimpl/dirfs/rename.go (renamed from drive/driveimpl/dirfs/rename.go)0
-rw-r--r--tailfs/tailfsimpl/dirfs/stat.go (renamed from drive/driveimpl/dirfs/stat.go)2
-rw-r--r--tailfs/tailfsimpl/fileserver.go (renamed from drive/driveimpl/fileserver.go)4
-rw-r--r--tailfs/tailfsimpl/local_impl.go (renamed from drive/driveimpl/local_impl.go)12
-rw-r--r--tailfs/tailfsimpl/remote_impl.go (renamed from drive/driveimpl/remote_impl.go)34
-rw-r--r--tailfs/tailfsimpl/shared/pathutil.go (renamed from drive/driveimpl/shared/pathutil.go)0
-rw-r--r--tailfs/tailfsimpl/shared/pathutil_test.go (renamed from drive/driveimpl/shared/pathutil_test.go)0
-rw-r--r--tailfs/tailfsimpl/shared/readonlydir.go (renamed from drive/driveimpl/shared/readonlydir.go)0
-rw-r--r--tailfs/tailfsimpl/shared/stat.go (renamed from drive/driveimpl/shared/stat.go)0
-rw-r--r--tailfs/tailfsimpl/tailfs_test.go (renamed from drive/driveimpl/drive_test.go)32
-rw-r--r--tsd/tsd.go10
-rw-r--r--tstest/integration/tailscaled_deps_test_darwin.go2
-rw-r--r--tstest/integration/tailscaled_deps_test_freebsd.go2
-rw-r--r--tstest/integration/tailscaled_deps_test_linux.go2
-rw-r--r--tstest/integration/tailscaled_deps_test_openbsd.go2
-rw-r--r--tstest/integration/tailscaled_deps_test_windows.go2
-rw-r--r--wgengine/netstack/netstack.go6
-rw-r--r--wgengine/userspace.go4
58 files changed, 180 insertions, 180 deletions
diff --git a/client/tailscale/localclient.go b/client/tailscale/localclient.go
index 533f35330..644d5d87e 100644
--- a/client/tailscale/localclient.go
+++ b/client/tailscale/localclient.go
@@ -28,7 +28,6 @@ import (
"go4.org/mem"
"tailscale.com/client/tailscale/apitype"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnstate"
@@ -36,6 +35,7 @@ import (
"tailscale.com/paths"
"tailscale.com/safesocket"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/tka"
"tailscale.com/types/key"
"tailscale.com/types/tkatype"
@@ -1429,7 +1429,7 @@ func (lc *LocalClient) TailFSSetFileServerAddr(ctx context.Context, addr string)
// TailFSShareSet adds or updates the given share in the list of shares that
// TailFS will serve to remote nodes. If a share with the same name already
// exists, the existing share is replaced/updated.
-func (lc *LocalClient) TailFSShareSet(ctx context.Context, share *drive.Share) error {
+func (lc *LocalClient) TailFSShareSet(ctx context.Context, share *tailfs.Share) error {
_, err := lc.send(ctx, "PUT", "/localapi/v0/tailfs/shares", http.StatusCreated, jsonBody(share))
return err
}
@@ -1459,12 +1459,12 @@ func (lc *LocalClient) TailFSShareRename(ctx context.Context, oldName, newName s
// TailFSShareList returns the list of shares that TailFS is currently serving
// to remote nodes.
-func (lc *LocalClient) TailFSShareList(ctx context.Context) ([]*drive.Share, error) {
+func (lc *LocalClient) TailFSShareList(ctx context.Context) ([]*tailfs.Share, error) {
result, err := lc.get200(ctx, "/localapi/v0/tailfs/shares")
if err != nil {
return nil, err
}
- var shares []*drive.Share
+ var shares []*tailfs.Share
err = json.Unmarshal(result, &shares)
return shares, err
}
diff --git a/client/tailscale/localclient_test.go b/client/tailscale/localclient_test.go
index a5f4e289f..f55d33a37 100644
--- a/client/tailscale/localclient_test.go
+++ b/client/tailscale/localclient_test.go
@@ -34,9 +34,9 @@ func TestDeps(t *testing.T) {
deptest.DepChecker{
BadDeps: map[string]string{
// Make sure we don't again accidentally bring in a dependency on
- // drive or its transitive dependencies
- "tailscale.com/drive/driveimpl": "https://github.com/tailscale/tailscale/pull/10631",
- "github.com/studio-b12/gowebdav": "https://github.com/tailscale/tailscale/pull/10631",
+ // TailFS or its transitive dependencies
+ "tailscale.com/tailfs/tailfsimpl": "https://github.com/tailscale/tailscale/pull/10631",
+ "github.com/studio-b12/gowebdav": "https://github.com/tailscale/tailscale/pull/10631",
},
}.Check(t)
}
diff --git a/cmd/derper/depaware.txt b/cmd/derper/depaware.txt
index 0b6df2561..c3243ddbd 100644
--- a/cmd/derper/depaware.txt
+++ b/cmd/derper/depaware.txt
@@ -86,7 +86,6 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa
tailscale.com/derp from tailscale.com/cmd/derper+
tailscale.com/derp/derphttp from tailscale.com/cmd/derper
tailscale.com/disco from tailscale.com/derp
- tailscale.com/drive from tailscale.com/client/tailscale+
tailscale.com/envknob from tailscale.com/client/tailscale+
tailscale.com/health from tailscale.com/net/tlsdial
tailscale.com/hostinfo from tailscale.com/net/interfaces+
@@ -115,6 +114,7 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa
💣 tailscale.com/safesocket from tailscale.com/client/tailscale
tailscale.com/syncs from tailscale.com/cmd/derper+
tailscale.com/tailcfg from tailscale.com/client/tailscale+
+ tailscale.com/tailfs from tailscale.com/client/tailscale+
tailscale.com/tka from tailscale.com/client/tailscale+
W tailscale.com/tsconst from tailscale.com/net/interfaces
tailscale.com/tstime from tailscale.com/derp+
diff --git a/cmd/tailscale/cli/share.go b/cmd/tailscale/cli/share.go
index fb2493fd6..b9481e2eb 100644
--- a/cmd/tailscale/cli/share.go
+++ b/cmd/tailscale/cli/share.go
@@ -10,7 +10,7 @@ import (
"strings"
"github.com/peterbourgon/ff/v3/ffcli"
- "tailscale.com/drive"
+ "tailscale.com/tailfs"
)
const (
@@ -69,7 +69,7 @@ func runShareSet(ctx context.Context, args []string) error {
name, path := args[0], args[1]
- err := localClient.TailFSShareSet(ctx, &drive.Share{
+ err := localClient.TailFSShareSet(ctx, &tailfs.Share{
Name: name,
Path: path,
})
@@ -145,7 +145,7 @@ func runShareList(ctx context.Context, args []string) error {
func buildShareLongHelp() string {
longHelpAs := ""
- if drive.AllowShareAs() {
+ if tailfs.AllowShareAs() {
longHelpAs = shareLongHelpAs
}
return fmt.Sprintf(shareLongHelpBase, longHelpAs)
diff --git a/cmd/tailscale/depaware.txt b/cmd/tailscale/depaware.txt
index 24ca03520..f9abb56fb 100644
--- a/cmd/tailscale/depaware.txt
+++ b/cmd/tailscale/depaware.txt
@@ -84,7 +84,6 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep
tailscale.com/derp from tailscale.com/derp/derphttp
tailscale.com/derp/derphttp from tailscale.com/net/netcheck
tailscale.com/disco from tailscale.com/derp
- tailscale.com/drive from tailscale.com/client/tailscale+
tailscale.com/envknob from tailscale.com/client/tailscale+
tailscale.com/health from tailscale.com/net/tlsdial
tailscale.com/health/healthmsg from tailscale.com/cmd/tailscale/cli
@@ -119,6 +118,7 @@ tailscale.com/cmd/tailscale dependencies: (generated by github.com/tailscale/dep
💣 tailscale.com/safesocket from tailscale.com/client/tailscale+
tailscale.com/syncs from tailscale.com/cmd/tailscale/cli+
tailscale.com/tailcfg from tailscale.com/client/tailscale+
+ tailscale.com/tailfs from tailscale.com/cmd/tailscale/cli+
tailscale.com/tka from tailscale.com/client/tailscale+
W tailscale.com/tsconst from tailscale.com/net/interfaces
tailscale.com/tstime from tailscale.com/control/controlhttp+
diff --git a/cmd/tailscaled/depaware.txt b/cmd/tailscaled/depaware.txt
index 83afbcd2e..71426e42a 100644
--- a/cmd/tailscaled/depaware.txt
+++ b/cmd/tailscaled/depaware.txt
@@ -88,7 +88,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
W github.com/dblohm7/wingoes/internal from github.com/dblohm7/wingoes/com
W 💣 github.com/dblohm7/wingoes/pe from tailscale.com/util/osdiag+
LW 💣 github.com/digitalocean/go-smbios/smbios from tailscale.com/posture
- 💣 github.com/djherbis/times from tailscale.com/drive/driveimpl
+ 💣 github.com/djherbis/times from tailscale.com/tailfs/tailfsimpl
github.com/fxamacker/cbor/v2 from tailscale.com/tka
github.com/gaissmai/bart from tailscale.com/net/tstun
W 💣 github.com/go-ole/go-ole from github.com/go-ole/go-ole/oleutil+
@@ -111,7 +111,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
L github.com/insomniacslk/dhcp/iana from github.com/insomniacslk/dhcp/dhcpv4
L github.com/insomniacslk/dhcp/interfaces from github.com/insomniacslk/dhcp/dhcpv4
L github.com/insomniacslk/dhcp/rfc1035label from github.com/insomniacslk/dhcp/dhcpv4
- github.com/jellydator/ttlcache/v3 from tailscale.com/drive/driveimpl/compositedav
+ github.com/jellydator/ttlcache/v3 from tailscale.com/tailfs/tailfsimpl/compositedav
L github.com/jmespath/go-jmespath from github.com/aws/aws-sdk-go-v2/service/ssm
L github.com/josharian/native from github.com/mdlayher/netlink+
L 💣 github.com/jsimonetti/rtnetlink from tailscale.com/net/interfaces+
@@ -172,7 +172,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
github.com/tailscale/wireguard-go/rwcancel from github.com/tailscale/wireguard-go/device+
github.com/tailscale/wireguard-go/tai64n from github.com/tailscale/wireguard-go/device
💣 github.com/tailscale/wireguard-go/tun from github.com/tailscale/wireguard-go/device+
- github.com/tailscale/xnet/webdav from tailscale.com/drive/driveimpl+
+ github.com/tailscale/xnet/webdav from tailscale.com/tailfs/tailfsimpl+
github.com/tailscale/xnet/webdav/internal/xml from github.com/tailscale/xnet/webdav
github.com/tcnksm/go-httpstat from tailscale.com/net/netcheck
LD github.com/u-root/u-root/pkg/termios from tailscale.com/ssh/tailssh
@@ -251,11 +251,6 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
tailscale.com/doctor/ethtool from tailscale.com/ipn/ipnlocal
💣 tailscale.com/doctor/permissions from tailscale.com/ipn/ipnlocal
tailscale.com/doctor/routetable from tailscale.com/ipn/ipnlocal
- tailscale.com/drive from tailscale.com/client/tailscale+
- tailscale.com/drive/driveimpl from tailscale.com/cmd/tailscaled
- tailscale.com/drive/driveimpl/compositedav from tailscale.com/drive/driveimpl
- tailscale.com/drive/driveimpl/dirfs from tailscale.com/drive/driveimpl+
- tailscale.com/drive/driveimpl/shared from tailscale.com/drive/driveimpl+
tailscale.com/envknob from tailscale.com/client/tailscale+
tailscale.com/health from tailscale.com/control/controlclient+
tailscale.com/health/healthmsg from tailscale.com/ipn/ipnlocal
@@ -325,6 +320,11 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
tailscale.com/syncs from tailscale.com/cmd/tailscaled+
tailscale.com/tailcfg from tailscale.com/client/tailscale+
tailscale.com/taildrop from tailscale.com/ipn/ipnlocal+
+ tailscale.com/tailfs from tailscale.com/client/tailscale+
+ tailscale.com/tailfs/tailfsimpl from tailscale.com/cmd/tailscaled
+ tailscale.com/tailfs/tailfsimpl/compositedav from tailscale.com/tailfs/tailfsimpl
+ tailscale.com/tailfs/tailfsimpl/dirfs from tailscale.com/tailfs/tailfsimpl+
+ tailscale.com/tailfs/tailfsimpl/shared from tailscale.com/tailfs/tailfsimpl+
LD tailscale.com/tempfork/gliderlabs/ssh from tailscale.com/ssh/tailssh
tailscale.com/tempfork/heap from tailscale.com/wgengine/magicsock
tailscale.com/tka from tailscale.com/client/tailscale+
diff --git a/cmd/tailscaled/tailscaled.go b/cmd/tailscaled/tailscaled.go
index 6100c8125..8c100f3be 100644
--- a/cmd/tailscaled/tailscaled.go
+++ b/cmd/tailscaled/tailscaled.go
@@ -33,7 +33,6 @@ import (
"tailscale.com/client/tailscale"
"tailscale.com/cmd/tailscaled/childproc"
"tailscale.com/control/controlclient"
- "tailscale.com/drive/driveimpl"
"tailscale.com/envknob"
"tailscale.com/ipn/conffile"
"tailscale.com/ipn/ipnlocal"
@@ -53,6 +52,7 @@ import (
"tailscale.com/paths"
"tailscale.com/safesocket"
"tailscale.com/syncs"
+ "tailscale.com/tailfs/tailfsimpl"
"tailscale.com/tsd"
"tailscale.com/tsweb/varz"
"tailscale.com/types/flagtype"
@@ -407,7 +407,7 @@ func run() (err error) {
debugMux = newDebugMux()
}
- sys.Set(driveimpl.NewFileSystemForRemote(logf))
+ sys.Set(tailfsimpl.NewFileSystemForRemote(logf))
return startIPNServer(context.Background(), logf, pol.PublicID, sys)
}
@@ -650,7 +650,7 @@ func tryEngine(logf logger.Logf, sys *tsd.System, name string) (onlyNetstack boo
Dialer: sys.Dialer.Get(),
SetSubsystem: sys.Set,
ControlKnobs: sys.ControlKnobs(),
- TailFSForLocal: driveimpl.NewFileSystemForLocal(logf),
+ TailFSForLocal: tailfsimpl.NewFileSystemForLocal(logf),
}
onlyNetstack = name == "userspace-networking"
@@ -847,7 +847,7 @@ func serveTailFS(args []string) error {
if len(args)%2 != 0 {
return errors.New("need <sharename> <path> pairs")
}
- s, err := driveimpl.NewFileServer()
+ s, err := tailfsimpl.NewFileServer()
if err != nil {
return fmt.Errorf("unable to start tailfs FileServer: %v", err)
}
diff --git a/cmd/tailscaled/tailscaled_windows.go b/cmd/tailscaled/tailscaled_windows.go
index bf1973caa..8d1ac37a2 100644
--- a/cmd/tailscaled/tailscaled_windows.go
+++ b/cmd/tailscaled/tailscaled_windows.go
@@ -42,13 +42,13 @@ import (
"golang.org/x/sys/windows/svc/eventlog"
"golang.zx2c4.com/wintun"
"golang.zx2c4.com/wireguard/windows/tunnel/winipcfg"
- "tailscale.com/drive/driveimpl"
"tailscale.com/envknob"
"tailscale.com/logpolicy"
"tailscale.com/logtail/backoff"
"tailscale.com/net/dns"
"tailscale.com/net/netmon"
"tailscale.com/net/tstun"
+ "tailscale.com/tailfs/tailfsimpl"
"tailscale.com/tsd"
"tailscale.com/types/logger"
"tailscale.com/types/logid"
@@ -316,7 +316,7 @@ func beWindowsSubprocess() bool {
}
sys.Set(netMon)
- sys.Set(driveimpl.NewFileSystemForRemote(log.Printf))
+ sys.Set(tailfsimpl.NewFileSystemForRemote(log.Printf))
publicLogID, _ := logid.ParsePublicID(logID)
err = startIPNServer(ctx, log.Printf, publicLogID, sys)
diff --git a/ipn/backend.go b/ipn/backend.go
index da7fb6f28..c4c64b9ee 100644
--- a/ipn/backend.go
+++ b/ipn/backend.go
@@ -8,9 +8,9 @@ import (
"strings"
"time"
- "tailscale.com/drive"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/empty"
"tailscale.com/types/key"
"tailscale.com/types/netmap"
@@ -136,7 +136,7 @@ type Notify struct {
// the identity of the unprivileged user that is running the application. A
// nil value here means that we're not broadcasting shares information, an
// empty value means that there are no shares.
- TailFSShares views.SliceView[*drive.Share, drive.ShareView]
+ TailFSShares views.SliceView[*tailfs.Share, tailfs.ShareView]
// type is mirrored in xcode/Shared/IPN.swift
}
diff --git a/ipn/ipn_clone.go b/ipn/ipn_clone.go
index a08530fad..e448bd065 100644
--- a/ipn/ipn_clone.go
+++ b/ipn/ipn_clone.go
@@ -9,8 +9,8 @@ import (
"maps"
"net/netip"
- "tailscale.com/drive"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/persist"
"tailscale.com/types/preftype"
)
@@ -26,7 +26,7 @@ func (src *Prefs) Clone() *Prefs {
dst.AdvertiseTags = append(src.AdvertiseTags[:0:0], src.AdvertiseTags...)
dst.AdvertiseRoutes = append(src.AdvertiseRoutes[:0:0], src.AdvertiseRoutes...)
if src.TailFSShares != nil {
- dst.TailFSShares = make([]*drive.Share, len(src.TailFSShares))
+ dst.TailFSShares = make([]*tailfs.Share, len(src.TailFSShares))
for i := range dst.TailFSShares {
dst.TailFSShares[i] = src.TailFSShares[i].Clone()
}
@@ -63,7 +63,7 @@ var _PrefsCloneNeedsRegeneration = Prefs(struct {
AppConnector AppConnectorPrefs
PostureChecking bool
NetfilterKind string
- TailFSShares []*drive.Share
+ TailFSShares []*tailfs.Share
Persist *persist.Persist
}{})
diff --git a/ipn/ipn_view.go b/ipn/ipn_view.go
index df3409c35..b156e37ef 100644
--- a/ipn/ipn_view.go
+++ b/ipn/ipn_view.go
@@ -10,8 +10,8 @@ import (
"errors"
"net/netip"
- "tailscale.com/drive"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/persist"
"tailscale.com/types/preftype"
"tailscale.com/types/views"
@@ -92,8 +92,8 @@ func (v PrefsView) AutoUpdate() AutoUpdatePrefs { return v.ж.AutoUpda
func (v PrefsView) AppConnector() AppConnectorPrefs { return v.ж.AppConnector }
func (v PrefsView) PostureChecking() bool { return v.ж.PostureChecking }
func (v PrefsView) NetfilterKind() string { return v.ж.NetfilterKind }
-func (v PrefsView) TailFSShares() views.SliceView[*drive.Share, drive.ShareView] {
- return views.SliceOfViews[*drive.Share, drive.ShareView](v.ж.TailFSShares)
+func (v PrefsView) TailFSShares() views.SliceView[*tailfs.Share, tailfs.ShareView] {
+ return views.SliceOfViews[*tailfs.Share, tailfs.ShareView](v.ж.TailFSShares)
}
func (v PrefsView) Persist() persist.PersistView { return v.ж.Persist.View() }
@@ -125,7 +125,7 @@ var _PrefsViewNeedsRegeneration = Prefs(struct {
AppConnector AppConnectorPrefs
PostureChecking bool
NetfilterKind string
- TailFSShares []*drive.Share
+ TailFSShares []*tailfs.Share
Persist *persist.Persist
}{})
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go
index b954afffc..77982eb31 100644
--- a/ipn/ipnlocal/local.go
+++ b/ipn/ipnlocal/local.go
@@ -43,7 +43,6 @@ import (
"tailscale.com/doctor/ethtool"
"tailscale.com/doctor/permissions"
"tailscale.com/doctor/routetable"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/health"
"tailscale.com/health/healthmsg"
@@ -70,6 +69,7 @@ import (
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/taildrop"
+ "tailscale.com/tailfs"
"tailscale.com/tka"
"tailscale.com/tsd"
"tailscale.com/tstime"
@@ -318,7 +318,7 @@ type LocalBackend struct {
// lastNotifiedTailFSShares keeps track of the last set of shares that we
// notified about.
- lastNotifiedTailFSShares atomic.Pointer[views.SliceView[*drive.Share, drive.ShareView]]
+ lastNotifiedTailFSShares atomic.Pointer[views.SliceView[*tailfs.Share, tailfs.ShareView]]
// outgoingFiles keeps track of Taildrop outgoing files keyed to their OutgoingFile.ID
outgoingFiles map[string]*ipn.OutgoingFile
@@ -447,7 +447,7 @@ func NewLocalBackend(logf logger.Logf, logID logid.PublicID, sys *tsd.System, lo
if ok {
currentShares := b.pm.prefs.TailFSShares()
if currentShares.Len() > 0 {
- var shares []*drive.Share
+ var shares []*tailfs.Share
for i := 0; i < currentShares.Len(); i++ {
shares = append(shares, currentShares.At(i).AsStruct())
}
diff --git a/ipn/ipnlocal/local_test.go b/ipn/ipnlocal/local_test.go
index 2713fff7d..8906bf939 100644
--- a/ipn/ipnlocal/local_test.go
+++ b/ipn/ipnlocal/local_test.go
@@ -24,13 +24,13 @@ import (
"tailscale.com/appc"
"tailscale.com/appc/appctest"
"tailscale.com/control/controlclient"
- "tailscale.com/drive"
- "tailscale.com/drive/driveimpl"
"tailscale.com/ipn"
"tailscale.com/ipn/store/mem"
"tailscale.com/net/interfaces"
"tailscale.com/net/tsaddr"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
+ "tailscale.com/tailfs/tailfsimpl"
"tailscale.com/tsd"
"tailscale.com/tstest"
"tailscale.com/types/dnstype"
@@ -2250,20 +2250,20 @@ func TestTailFSManageShares(t *testing.T) {
tests := []struct {
name string
disabled bool
- existing []*drive.Share
- add *drive.Share
+ existing []*tailfs.Share
+ add *tailfs.Share
remove string
rename [2]string
expect any
}{
{
name: "append",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "b"},
{Name: "d"},
},
- add: &drive.Share{Name: " E "},
- expect: []*drive.Share{
+ add: &tailfs.Share{Name: " E "},
+ expect: []*tailfs.Share{
{Name: "b"},
{Name: "d"},
{Name: "e"},
@@ -2271,12 +2271,12 @@ func TestTailFSManageShares(t *testing.T) {
},
{
name: "prepend",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "b"},
{Name: "d"},
},
- add: &drive.Share{Name: " A "},
- expect: []*drive.Share{
+ add: &tailfs.Share{Name: " A "},
+ expect: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
{Name: "d"},
@@ -2284,12 +2284,12 @@ func TestTailFSManageShares(t *testing.T) {
},
{
name: "insert",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "b"},
{Name: "d"},
},
- add: &drive.Share{Name: " C "},
- expect: []*drive.Share{
+ add: &tailfs.Share{Name: " C "},
+ expect: []*tailfs.Share{
{Name: "b"},
{Name: "c"},
{Name: "d"},
@@ -2297,43 +2297,43 @@ func TestTailFSManageShares(t *testing.T) {
},
{
name: "replace",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "b", Path: "i"},
{Name: "d"},
},
- add: &drive.Share{Name: " B ", Path: "ii"},
- expect: []*drive.Share{
+ add: &tailfs.Share{Name: " B ", Path: "ii"},
+ expect: []*tailfs.Share{
{Name: "b", Path: "ii"},
{Name: "d"},
},
},
{
name: "add_bad_name",
- add: &drive.Share{Name: "$"},
+ add: &tailfs.Share{Name: "$"},
expect: ErrInvalidShareName,
},
{
name: "add_disabled",
disabled: true,
- add: &drive.Share{Name: "a"},
+ add: &tailfs.Share{Name: "a"},
expect: ErrTailFSNotEnabled,
},
{
name: "remove",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
{Name: "c"},
},
remove: "b",
- expect: []*drive.Share{
+ expect: []*tailfs.Share{
{Name: "a"},
{Name: "c"},
},
},
{
name: "remove_non_existing",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
{Name: "c"},
@@ -2349,19 +2349,19 @@ func TestTailFSManageShares(t *testing.T) {
},
{
name: "rename",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
},
rename: [2]string{"a", " C "},
- expect: []*drive.Share{
+ expect: []*tailfs.Share{
{Name: "b"},
{Name: "c"},
},
},
{
name: "rename_not_exist",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
},
@@ -2370,7 +2370,7 @@ func TestTailFSManageShares(t *testing.T) {
},
{
name: "rename_exists",
- existing: []*drive.Share{
+ existing: []*tailfs.Share{
{Name: "a"},
{Name: "b"},
},
@@ -2390,9 +2390,9 @@ func TestTailFSManageShares(t *testing.T) {
},
}
- drive.DisallowShareAs = true
+ tailfs.DisallowShareAs = true
t.Cleanup(func() {
- drive.DisallowShareAs = false
+ tailfs.DisallowShareAs = false
})
for _, tt := range tests {
@@ -2406,14 +2406,14 @@ func TestTailFSManageShares(t *testing.T) {
self := b.netMap.SelfNode.AsStruct()
self.CapMap = tailcfg.NodeCapMap{tailcfg.NodeAttrsTailFSShare: nil}
b.netMap.SelfNode = self.View()
- b.sys.Set(driveimpl.NewFileSystemForRemote(b.logf))
+ b.sys.Set(tailfsimpl.NewFileSystemForRemote(b.logf))
}
b.mu.Unlock()
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
t.Cleanup(cancel)
- result := make(chan views.SliceView[*drive.Share, drive.ShareView], 1)
+ result := make(chan views.SliceView[*tailfs.Share, tailfs.ShareView], 1)
var wg sync.WaitGroup
wg.Add(1)
@@ -2447,7 +2447,7 @@ func TestTailFSManageShares(t *testing.T) {
if !errors.Is(err, e) {
t.Errorf("expected error, want: %v got: %v", e, err)
}
- case []*drive.Share:
+ case []*tailfs.Share:
if err != nil {
t.Errorf("unexpected error: %v", err)
} else {
diff --git a/ipn/ipnlocal/peerapi.go b/ipn/ipnlocal/peerapi.go
index 4fffe76c5..6843292b2 100644
--- a/ipn/ipnlocal/peerapi.go
+++ b/ipn/ipnlocal/peerapi.go
@@ -29,7 +29,6 @@ import (
"github.com/kortschak/wol"
"golang.org/x/net/dns/dnsmessage"
"golang.org/x/net/http/httpguts"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/health"
"tailscale.com/hostinfo"
@@ -40,6 +39,7 @@ import (
"tailscale.com/net/sockstats"
"tailscale.com/tailcfg"
"tailscale.com/taildrop"
+ "tailscale.com/tailfs"
"tailscale.com/types/views"
"tailscale.com/util/clientmetric"
"tailscale.com/util/httphdr"
@@ -1161,7 +1161,7 @@ func (h *peerAPIHandler) handleServeTailFS(w http.ResponseWriter, r *http.Reques
rawPerms = append(rawPerms, []byte(cap))
}
- p, err := drive.ParsePermissions(rawPerms)
+ p, err := tailfs.ParsePermissions(rawPerms)
if err != nil {
h.logf("tailfs: error parsing permissions: %w", err.Error())
http.Error(w, err.Error(), http.StatusInternalServerError)
diff --git a/ipn/ipnlocal/drive.go b/ipn/ipnlocal/tailfs.go
index a065513ef..4fd1b95af 100644
--- a/ipn/ipnlocal/drive.go
+++ b/ipn/ipnlocal/tailfs.go
@@ -11,9 +11,9 @@ import (
"slices"
"strings"
- "tailscale.com/drive"
"tailscale.com/ipn"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/netmap"
"tailscale.com/types/views"
)
@@ -73,7 +73,7 @@ func (b *LocalBackend) TailFSSetFileServerAddr(addr string) error {
// replaces the existing share if one with the same name already exists. To
// avoid potential incompatibilities across file systems, share names are
// limited to alphanumeric characters and the underscore _.
-func (b *LocalBackend) TailFSSetShare(share *drive.Share) error {
+func (b *LocalBackend) TailFSSetShare(share *tailfs.Share) error {
var err error
share.Name, err = normalizeShareName(share.Name)
if err != nil {
@@ -108,7 +108,7 @@ func normalizeShareName(name string) (string, error) {
return name, nil
}
-func (b *LocalBackend) tailFSSetShareLocked(share *drive.Share) (views.SliceView[*drive.Share, drive.ShareView], error) {
+func (b *LocalBackend) tailFSSetShareLocked(share *tailfs.Share) (views.SliceView[*tailfs.Share, tailfs.ShareView], error) {
existingShares := b.pm.prefs.TailFSShares()
fs, ok := b.sys.TailFSForRemote.GetOK()
@@ -117,7 +117,7 @@ func (b *LocalBackend) tailFSSetShareLocked(share *drive.Share) (views.SliceView
}
addedShare := false
- var shares []*drive.Share
+ var shares []*tailfs.Share
for i := 0; i < existingShares.Len(); i++ {
existing := existingShares.At(i)
if existing.Name() != share.Name {
@@ -167,7 +167,7 @@ func (b *LocalBackend) TailFSRenameShare(oldName, newName string) error {
return nil
}
-func (b *LocalBackend) tailFSRenameShareLocked(oldName, newName string) (views.SliceView[*drive.Share, drive.ShareView], error) {
+func (b *LocalBackend) tailFSRenameShareLocked(oldName, newName string) (views.SliceView[*tailfs.Share, tailfs.ShareView], error) {
existingShares := b.pm.prefs.TailFSShares()
fs, ok := b.sys.TailFSForRemote.GetOK()
@@ -176,7 +176,7 @@ func (b *LocalBackend) tailFSRenameShareLocked(oldName, newName string) (views.S
}
found := false
- var shares []*drive.Share
+ var shares []*tailfs.Share
for i := 0; i < existingShares.Len(); i++ {
existing := existingShares.At(i)
if existing.Name() == newName {
@@ -196,7 +196,7 @@ func (b *LocalBackend) tailFSRenameShareLocked(oldName, newName string) (views.S
return existingShares, os.ErrNotExist
}
- slices.SortFunc(shares, drive.CompareShares)
+ slices.SortFunc(shares, tailfs.CompareShares)
err := b.tailFSSetSharesLocked(shares)
if err != nil {
return existingShares, err
@@ -228,7 +228,7 @@ func (b *LocalBackend) TailFSRemoveShare(name string) error {
return nil
}
-func (b *LocalBackend) tailFSRemoveShareLocked(name string) (views.SliceView[*drive.Share, drive.ShareView], error) {
+func (b *LocalBackend) tailFSRemoveShareLocked(name string) (views.SliceView[*tailfs.Share, tailfs.ShareView], error) {
existingShares := b.pm.prefs.TailFSShares()
fs, ok := b.sys.TailFSForRemote.GetOK()
@@ -237,7 +237,7 @@ func (b *LocalBackend) tailFSRemoveShareLocked(name string) (views.SliceView[*dr
}
found := false
- var shares []*drive.Share
+ var shares []*tailfs.Share
for i := 0; i < existingShares.Len(); i++ {
existing := existingShares.At(i)
if existing.Name() != name {
@@ -260,7 +260,7 @@ func (b *LocalBackend) tailFSRemoveShareLocked(name string) (views.SliceView[*dr
return b.pm.prefs.TailFSShares(), nil
}
-func (b *LocalBackend) tailFSSetSharesLocked(shares []*drive.Share) error {
+func (b *LocalBackend) tailFSSetSharesLocked(shares []*tailfs.Share) error {
prefs := b.pm.prefs.AsStruct()
prefs.ApplyEdits(&ipn.MaskedPrefs{
Prefs: ipn.Prefs{
@@ -273,10 +273,10 @@ func (b *LocalBackend) tailFSSetSharesLocked(shares []*drive.Share) error {
// tailFSNotifyShares notifies IPN bus listeners (e.g. Mac Application process)
// about the latest list of shares.
-func (b *LocalBackend) tailFSNotifyShares(shares views.SliceView[*drive.Share, drive.ShareView]) {
+func (b *LocalBackend) tailFSNotifyShares(shares views.SliceView[*tailfs.Share, tailfs.ShareView]) {
// Ensures shares is not nil to distinguish "no shares" from "not notifying shares"
if shares.IsNil() {
- shares = views.SliceOfViews(make([]*drive.Share, 0))
+ shares = views.SliceOfViews(make([]*tailfs.Share, 0))
}
b.send(ipn.Notify{TailFSShares: shares})
}
@@ -284,7 +284,7 @@ func (b *LocalBackend) tailFSNotifyShares(shares views.SliceView[*drive.Share, d
// tailFSNotifyCurrentSharesLocked sends an ipn.Notify if the current set of
// shares has changed since the last notification.
func (b *LocalBackend) tailFSNotifyCurrentSharesLocked() {
- var shares views.SliceView[*drive.Share, drive.ShareView]
+ var shares views.SliceView[*tailfs.Share, tailfs.ShareView]
if b.tailFSSharingEnabledLocked() {
// Only populate shares if sharing is enabled.
shares = b.pm.prefs.TailFSShares()
@@ -297,7 +297,7 @@ func (b *LocalBackend) tailFSNotifyCurrentSharesLocked() {
}
}
-func tailFSShareViewsEqual(a *views.SliceView[*drive.Share, drive.ShareView], b views.SliceView[*drive.Share, drive.ShareView]) bool {
+func tailFSShareViewsEqual(a *views.SliceView[*tailfs.Share, tailfs.ShareView], b views.SliceView[*tailfs.Share, tailfs.ShareView]) bool {
if a == nil {
return false
}
@@ -307,7 +307,7 @@ func tailFSShareViewsEqual(a *views.SliceView[*drive.Share, drive.ShareView], b
}
for i := 0; i < a.Len(); i++ {
- if !drive.ShareViewsEqual(a.At(i), b.At(i)) {
+ if !tailfs.ShareViewsEqual(a.At(i), b.At(i)) {
return false
}
}
@@ -316,7 +316,7 @@ func tailFSShareViewsEqual(a *views.SliceView[*drive.Share, drive.ShareView], b
}
// TailFSGetShares() gets the current list of TailFS shares, sorted by name.
-func (b *LocalBackend) TailFSGetShares() views.SliceView[*drive.Share, drive.ShareView] {
+func (b *LocalBackend) TailFSGetShares() views.SliceView[*tailfs.Share, tailfs.ShareView] {
b.mu.Lock()
defer b.mu.Unlock()
@@ -331,7 +331,7 @@ func (b *LocalBackend) updateTailFSPeersLocked(nm *netmap.NetworkMap) {
return
}
- var tailFSRemotes []*drive.Remote
+ var tailFSRemotes []*tailfs.Remote
if b.tailFSAccessEnabledLocked() {
// Only populate peers if access is enabled, otherwise leave blank.
tailFSRemotes = b.tailFSRemotesFromPeers(nm)
@@ -340,8 +340,8 @@ func (b *LocalBackend) updateTailFSPeersLocked(nm *netmap.NetworkMap) {
fs.SetRemotes(b.netMap.Domain, tailFSRemotes, &tailFSTransport{b: b})
}
-func (b *LocalBackend) tailFSRemotesFromPeers(nm *netmap.NetworkMap) []*drive.Remote {
- tailFSRemotes := make([]*drive.Remote, 0, len(nm.Peers))
+func (b *LocalBackend) tailFSRemotesFromPeers(nm *netmap.NetworkMap) []*tailfs.Remote {
+ tailFSRemotes := make([]*tailfs.Remote, 0, len(nm.Peers))
for _, p := range nm.Peers {
// Exclude mullvad exit nodes from list of TailFS peers
// TODO(oxtoacart) - once we have a better mechanism for finding only accessible sharers
@@ -352,7 +352,7 @@ func (b *LocalBackend) tailFSRemotesFromPeers(nm *netmap.NetworkMap) []*drive.Re
peerID := p.ID()
url := fmt.Sprintf("%s/%s", peerAPIBase(nm, p), tailFSPrefix[1:])
- tailFSRemotes = append(tailFSRemotes, &drive.Remote{
+ tailFSRemotes = append(tailFSRemotes, &tailfs.Remote{
Name: p.DisplayName(false),
URL: url,
Available: func() bool {
diff --git a/ipn/ipnlocal/drive_test.go b/ipn/ipnlocal/tailfs_test.go
index dade9583f..dade9583f 100644
--- a/ipn/ipnlocal/drive_test.go
+++ b/ipn/ipnlocal/tailfs_test.go
diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go
index a10668a18..53e5770f1 100644
--- a/ipn/localapi/localapi.go
+++ b/ipn/localapi/localapi.go
@@ -34,7 +34,6 @@ import (
"github.com/google/uuid"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/clientupdate"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/health"
"tailscale.com/hostinfo"
@@ -48,6 +47,7 @@ import (
"tailscale.com/net/portmapper"
"tailscale.com/tailcfg"
"tailscale.com/taildrop"
+ "tailscale.com/tailfs"
"tailscale.com/tka"
"tailscale.com/tstime"
"tailscale.com/types/key"
@@ -2765,7 +2765,7 @@ func (h *Handler) serveShares(w http.ResponseWriter, r *http.Request) {
}
switch r.Method {
case "PUT":
- var share drive.Share
+ var share tailfs.Share
err := json.NewDecoder(r.Body).Decode(&share)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
@@ -2781,7 +2781,7 @@ func (h *Handler) serveShares(w http.ResponseWriter, r *http.Request) {
http.Error(w, "not a directory", http.StatusBadRequest)
return
}
- if drive.AllowShareAs() {
+ if tailfs.AllowShareAs() {
// share as the connected user
username, err := h.getUsername()
if err != nil {
diff --git a/ipn/prefs.go b/ipn/prefs.go
index 266cd9dda..0055b7fb2 100644
--- a/ipn/prefs.go
+++ b/ipn/prefs.go
@@ -18,11 +18,11 @@ import (
"strings"
"tailscale.com/atomicfile"
- "tailscale.com/drive"
"tailscale.com/ipn/ipnstate"
"tailscale.com/net/netaddr"
"tailscale.com/net/tsaddr"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/opt"
"tailscale.com/types/persist"
"tailscale.com/types/preftype"
@@ -227,7 +227,7 @@ type Prefs struct {
// TailFSShares are the configured TailFSShares, stored in increasing order
// by name.
- TailFSShares []*drive.Share
+ TailFSShares []*tailfs.Share
// The Persist field is named 'Config' in the file for backward
// compatibility with earlier versions.
@@ -564,7 +564,7 @@ func (p *Prefs) Equals(p2 *Prefs) bool {
p.AutoUpdate.Equals(p2.AutoUpdate) &&
p.AppConnector == p2.AppConnector &&
p.PostureChecking == p2.PostureChecking &&
- slices.EqualFunc(p.TailFSShares, p2.TailFSShares, drive.SharesEqual) &&
+ slices.EqualFunc(p.TailFSShares, p2.TailFSShares, tailfs.SharesEqual) &&
p.NetfilterKind == p2.NetfilterKind
}
diff --git a/tailcfg/tailcfg_test.go b/tailcfg/tailcfg_test.go
index 2940084d7..9934f3e52 100644
--- a/tailcfg/tailcfg_test.go
+++ b/tailcfg/tailcfg_test.go
@@ -848,9 +848,9 @@ func TestDeps(t *testing.T) {
deptest.DepChecker{
BadDeps: map[string]string{
// Make sure we don't again accidentally bring in a dependency on
- // drive or its transitive dependencies
- "tailscale.com/drive/driveimpl": "https://github.com/tailscale/tailscale/pull/10631",
- "github.com/studio-b12/gowebdav": "https://github.com/tailscale/tailscale/pull/10631",
+ // TailFS or its transitive dependencies
+ "tailscale.com/tailfs/tailfsimpl": "https://github.com/tailscale/tailscale/pull/10631",
+ "github.com/studio-b12/gowebdav": "https://github.com/tailscale/tailscale/pull/10631",
},
}.Check(t)
}
diff --git a/drive/local.go b/tailfs/local.go
index b6a83dd09..67f0c3fe5 100644
--- a/drive/local.go
+++ b/tailfs/local.go
@@ -1,13 +1,13 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-// Package drive provides a filesystem that allows sharing folders between
-// Tailscale nodes using WebDAV. The actual implementation of the core drive
-// functionality lives in package driveimpl. These packages are separated to
-// allow users of drive to refer to the interfaces without having a hard
-// dependency on drive, so that programs which don't actually use drive can
+// Package tailfs provides a filesystem that allows sharing folders between
+// Tailscale nodes using WebDAV. The actual implementation of the core TailFS
+// functionality lives in package tailfsimpl. These packages are separated to
+// allow users of tailfs to refer to the interfaces without having a hard
+// dependency on tailfs, so that programs which don't actually use tailfs can
// avoid its transitive dependencies.
-package drive
+package tailfs
import (
"net"
diff --git a/drive/remote.go b/tailfs/remote.go
index 083c7a8a2..42c5b22b7 100644
--- a/drive/remote.go
+++ b/tailfs/remote.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package drive
+package tailfs
//go:generate go run tailscale.com/cmd/viewer --type=Share --clonefunc
diff --git a/drive/remote_nonunix.go b/tailfs/remote_nonunix.go
index d1153c592..5eb32f557 100644
--- a/drive/remote_nonunix.go
+++ b/tailfs/remote_nonunix.go
@@ -3,7 +3,7 @@
//go:build !unix
-package drive
+package tailfs
func doAllowShareAs() bool {
// On non-UNIX platforms, we use the GUI application (e.g. Windows taskbar
diff --git a/drive/remote_permissions.go b/tailfs/remote_permissions.go
index 2188ea3c6..701fdbaee 100644
--- a/drive/remote_permissions.go
+++ b/tailfs/remote_permissions.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package drive
+package tailfs
import (
"encoding/json"
diff --git a/drive/remote_permissions_test.go b/tailfs/remote_permissions_test.go
index ff039c800..68d012c19 100644
--- a/drive/remote_permissions_test.go
+++ b/tailfs/remote_permissions_test.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package drive
+package tailfs
import (
"encoding/json"
diff --git a/drive/remote_unix.go b/tailfs/remote_unix.go
index 0e41524db..ed172e8be 100644
--- a/drive/remote_unix.go
+++ b/tailfs/remote_unix.go
@@ -3,7 +3,7 @@
//go:build unix
-package drive
+package tailfs
import "tailscale.com/version"
diff --git a/drive/drive_clone.go b/tailfs/tailfs_clone.go
index 927f3b81c..a708c7bb7 100644
--- a/drive/drive_clone.go
+++ b/tailfs/tailfs_clone.go
@@ -3,7 +3,7 @@
// Code generated by tailscale.com/cmd/cloner; DO NOT EDIT.
-package drive
+package tailfs
// Clone makes a deep copy of Share.
// The result aliases no memory with the original.
diff --git a/drive/drive_view.go b/tailfs/tailfs_view.go
index a6adfbc70..3d38f5072 100644
--- a/drive/drive_view.go
+++ b/tailfs/tailfs_view.go
@@ -3,7 +3,7 @@
// Code generated by tailscale/cmd/viewer; DO NOT EDIT.
-package drive
+package tailfs
import (
"encoding/json"
diff --git a/drive/driveimpl/birthtiming.go b/tailfs/tailfsimpl/birthtiming.go
index d55ea0b83..8e7f8c965 100644
--- a/drive/driveimpl/birthtiming.go
+++ b/tailfs/tailfsimpl/birthtiming.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"context"
diff --git a/drive/driveimpl/birthtiming_test.go b/tailfs/tailfsimpl/birthtiming_test.go
index a43ffa33d..7054c783b 100644
--- a/drive/driveimpl/birthtiming_test.go
+++ b/tailfs/tailfsimpl/birthtiming_test.go
@@ -5,7 +5,7 @@
//go:build windows || darwin
-package driveimpl
+package tailfsimpl
import (
"context"
diff --git a/drive/driveimpl/compositedav/compositedav.go b/tailfs/tailfsimpl/compositedav/compositedav.go
index 9bcba158e..1cf507e8b 100644
--- a/drive/driveimpl/compositedav/compositedav.go
+++ b/tailfs/tailfsimpl/compositedav/compositedav.go
@@ -17,8 +17,8 @@ import (
"sync"
"github.com/tailscale/xnet/webdav"
- "tailscale.com/drive/driveimpl/dirfs"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/dirfs"
+ "tailscale.com/tailfs/tailfsimpl/shared"
"tailscale.com/tstime"
"tailscale.com/types/logger"
)
diff --git a/drive/driveimpl/compositedav/propfind.go b/tailfs/tailfsimpl/compositedav/propfind.go
index 868a1d2b2..7a9a8075a 100644
--- a/drive/driveimpl/compositedav/propfind.go
+++ b/tailfs/tailfsimpl/compositedav/propfind.go
@@ -10,7 +10,7 @@ import (
"net/http"
"regexp"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
)
var (
diff --git a/drive/driveimpl/compositedav/stat_cache.go b/tailfs/tailfsimpl/compositedav/stat_cache.go
index 8be5888a8..8be5888a8 100644
--- a/drive/driveimpl/compositedav/stat_cache.go
+++ b/tailfs/tailfsimpl/compositedav/stat_cache.go
diff --git a/drive/driveimpl/compositedav/stat_cache_test.go b/tailfs/tailfsimpl/compositedav/stat_cache_test.go
index c69832f26..c69832f26 100644
--- a/drive/driveimpl/compositedav/stat_cache_test.go
+++ b/tailfs/tailfsimpl/compositedav/stat_cache_test.go
diff --git a/drive/driveimpl/connlistener.go b/tailfs/tailfsimpl/connlistener.go
index e1fcb3b67..6ddb1adab 100644
--- a/drive/driveimpl/connlistener.go
+++ b/tailfs/tailfsimpl/connlistener.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"log"
diff --git a/drive/driveimpl/connlistener_test.go b/tailfs/tailfsimpl/connlistener_test.go
index d8666448a..6267d837e 100644
--- a/drive/driveimpl/connlistener_test.go
+++ b/tailfs/tailfsimpl/connlistener_test.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"log"
diff --git a/drive/driveimpl/dirfs/dirfs.go b/tailfs/tailfsimpl/dirfs/dirfs.go
index c1f28bb9d..21017dfd9 100644
--- a/drive/driveimpl/dirfs/dirfs.go
+++ b/tailfs/tailfsimpl/dirfs/dirfs.go
@@ -10,7 +10,7 @@ import (
"strings"
"time"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
"tailscale.com/tstime"
)
diff --git a/drive/driveimpl/dirfs/dirfs_test.go b/tailfs/tailfsimpl/dirfs/dirfs_test.go
index 4d83765d9..9dd054da0 100644
--- a/drive/driveimpl/dirfs/dirfs_test.go
+++ b/tailfs/tailfsimpl/dirfs/dirfs_test.go
@@ -15,7 +15,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/tailscale/xnet/webdav"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
"tailscale.com/tstest"
)
diff --git a/drive/driveimpl/dirfs/mkdir.go b/tailfs/tailfsimpl/dirfs/mkdir.go
index 2fb763dd5..295033e80 100644
--- a/drive/driveimpl/dirfs/mkdir.go
+++ b/tailfs/tailfsimpl/dirfs/mkdir.go
@@ -7,7 +7,7 @@ import (
"context"
"os"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
)
// Mkdir implements webdav.FileSystem. All attempts to Mkdir a directory that
diff --git a/drive/driveimpl/dirfs/openfile.go b/tailfs/tailfsimpl/dirfs/openfile.go
index 9b678719b..bd8dedd55 100644
--- a/drive/driveimpl/dirfs/openfile.go
+++ b/tailfs/tailfsimpl/dirfs/openfile.go
@@ -9,7 +9,7 @@ import (
"os"
"github.com/tailscale/xnet/webdav"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
)
// OpenFile implements interface webdav.Filesystem.
diff --git a/drive/driveimpl/dirfs/removeall.go b/tailfs/tailfsimpl/dirfs/removeall.go
index 8fafc8c92..8fafc8c92 100644
--- a/drive/driveimpl/dirfs/removeall.go
+++ b/tailfs/tailfsimpl/dirfs/removeall.go
diff --git a/drive/driveimpl/dirfs/rename.go b/tailfs/tailfsimpl/dirfs/rename.go
index 5049acb89..5049acb89 100644
--- a/drive/driveimpl/dirfs/rename.go
+++ b/tailfs/tailfsimpl/dirfs/rename.go
diff --git a/drive/driveimpl/dirfs/stat.go b/tailfs/tailfsimpl/dirfs/stat.go
index 2e4243bed..5b51414a6 100644
--- a/drive/driveimpl/dirfs/stat.go
+++ b/tailfs/tailfsimpl/dirfs/stat.go
@@ -8,7 +8,7 @@ import (
"io/fs"
"os"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
)
// Stat implements webdav.FileSystem.
diff --git a/drive/driveimpl/fileserver.go b/tailfs/tailfsimpl/fileserver.go
index d502a92c0..73ea08b6c 100644
--- a/drive/driveimpl/fileserver.go
+++ b/tailfs/tailfsimpl/fileserver.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"net"
@@ -9,7 +9,7 @@ import (
"sync"
"github.com/tailscale/xnet/webdav"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs/tailfsimpl/shared"
)
// FileServer is a standalone WebDAV server that dynamically serves up shares.
diff --git a/drive/driveimpl/local_impl.go b/tailfs/tailfsimpl/local_impl.go
index 117f67bcd..00ca25910 100644
--- a/drive/driveimpl/local_impl.go
+++ b/tailfs/tailfsimpl/local_impl.go
@@ -1,8 +1,8 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-// Package driveimpl provides an implementation of package drive.
-package driveimpl
+// Package tailfsimpl provides an implementation of package tailfs.
+package tailfsimpl
import (
"log"
@@ -10,9 +10,9 @@ import (
"net/http"
"time"
- "tailscale.com/drive"
- "tailscale.com/drive/driveimpl/compositedav"
- "tailscale.com/drive/driveimpl/dirfs"
+ "tailscale.com/tailfs"
+ "tailscale.com/tailfs/tailfsimpl/compositedav"
+ "tailscale.com/tailfs/tailfsimpl/dirfs"
"tailscale.com/types/logger"
)
@@ -69,7 +69,7 @@ func (s *FileSystemForLocal) HandleConn(conn net.Conn, remoteAddr net.Addr) erro
// SetRemotes sets the complete set of remotes on the given tailnet domain
// using a map of name -> url. If transport is specified, that transport
// will be used to connect to these remotes.
-func (s *FileSystemForLocal) SetRemotes(domain string, remotes []*drive.Remote, transport http.RoundTripper) {
+func (s *FileSystemForLocal) SetRemotes(domain string, remotes []*tailfs.Remote, transport http.RoundTripper) {
children := make([]*compositedav.Child, 0, len(remotes))
for _, remote := range remotes {
children = append(children, &compositedav.Child{
diff --git a/drive/driveimpl/remote_impl.go b/tailfs/tailfsimpl/remote_impl.go
index 0a9633f19..d5901b73f 100644
--- a/drive/driveimpl/remote_impl.go
+++ b/tailfs/tailfsimpl/remote_impl.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"bufio"
@@ -23,11 +23,11 @@ import (
"time"
"github.com/tailscale/xnet/webdav"
- "tailscale.com/drive"
- "tailscale.com/drive/driveimpl/compositedav"
- "tailscale.com/drive/driveimpl/dirfs"
- "tailscale.com/drive/driveimpl/shared"
"tailscale.com/safesocket"
+ "tailscale.com/tailfs"
+ "tailscale.com/tailfs/tailfsimpl/compositedav"
+ "tailscale.com/tailfs/tailfsimpl/dirfs"
+ "tailscale.com/tailfs/tailfsimpl/shared"
"tailscale.com/types/logger"
)
@@ -53,7 +53,7 @@ type FileSystemForRemote struct {
// them, acquire a read lock before reading any of them.
mu sync.RWMutex
fileServerAddr string
- shares []*drive.Share
+ shares []*tailfs.Share
children map[string]*compositedav.Child
userServers map[string]*userServer
}
@@ -67,9 +67,9 @@ func (s *FileSystemForRemote) SetFileServerAddr(addr string) {
// SetShares implements tailfs.FileSystemForRemote. Shares must be sorted
// according to tailfs.CompareShares.
-func (s *FileSystemForRemote) SetShares(shares []*drive.Share) {
+func (s *FileSystemForRemote) SetShares(shares []*tailfs.Share) {
userServers := make(map[string]*userServer)
- if drive.AllowShareAs() {
+ if tailfs.AllowShareAs() {
// Set up per-user server by running the current executable as an
// unprivileged user in order to avoid privilege escalation.
executable, err := os.Executable()
@@ -112,7 +112,7 @@ func (s *FileSystemForRemote) SetShares(shares []*drive.Share) {
s.closeChildren(oldChildren)
}
-func (s *FileSystemForRemote) buildChild(share *drive.Share) *compositedav.Child {
+func (s *FileSystemForRemote) buildChild(share *tailfs.Share) *compositedav.Child {
return &compositedav.Child{
Child: &dirfs.Child{
Name: share.Name,
@@ -133,8 +133,8 @@ func (s *FileSystemForRemote) buildChild(share *drive.Share) *compositedav.Child
shareName := string(shareNameBytes)
s.mu.RLock()
- var share *drive.Share
- i, shareFound := slices.BinarySearchFunc(s.shares, shareName, func(s *drive.Share, name string) int {
+ var share *tailfs.Share
+ i, shareFound := slices.BinarySearchFunc(s.shares, shareName, func(s *tailfs.Share, name string) int {
return strings.Compare(s.Name, name)
})
if shareFound {
@@ -149,7 +149,7 @@ func (s *FileSystemForRemote) buildChild(share *drive.Share) *compositedav.Child
}
var addr string
- if !drive.AllowShareAs() {
+ if !tailfs.AllowShareAs() {
addr = fileServerAddr
} else {
userServer, found := userServers[share.As]
@@ -177,17 +177,17 @@ func (s *FileSystemForRemote) buildChild(share *drive.Share) *compositedav.Child
}
// ServeHTTPWithPerms implements tailfs.FileSystemForRemote.
-func (s *FileSystemForRemote) ServeHTTPWithPerms(permissions drive.Permissions, w http.ResponseWriter, r *http.Request) {
+func (s *FileSystemForRemote) ServeHTTPWithPerms(permissions tailfs.Permissions, w http.ResponseWriter, r *http.Request) {
isWrite := writeMethods[r.Method]
if isWrite {
share := shared.CleanAndSplit(r.URL.Path)[0]
switch permissions.For(share) {
- case drive.PermissionNone:
+ case tailfs.PermissionNone:
// If we have no permissions to this share, treat it as not found
// to avoid leaking any information about the share's existence.
http.Error(w, "not found", http.StatusNotFound)
return
- case drive.PermissionReadOnly:
+ case tailfs.PermissionReadOnly:
http.Error(w, "permission denied", http.StatusForbidden)
return
}
@@ -200,7 +200,7 @@ func (s *FileSystemForRemote) ServeHTTPWithPerms(permissions drive.Permissions,
children := make([]*compositedav.Child, 0, len(childrenMap))
// filter out shares to which the connecting principal has no access
for name, child := range childrenMap {
- if permissions.For(name) == drive.PermissionNone {
+ if permissions.For(name) == tailfs.PermissionNone {
continue
}
@@ -247,7 +247,7 @@ func (s *FileSystemForRemote) Close() error {
// content is served as that Share.As user.
type userServer struct {
logf logger.Logf
- shares []*drive.Share
+ shares []*tailfs.Share
username string
executable string
diff --git a/drive/driveimpl/shared/pathutil.go b/tailfs/tailfsimpl/shared/pathutil.go
index 49f8ba849..49f8ba849 100644
--- a/drive/driveimpl/shared/pathutil.go
+++ b/tailfs/tailfsimpl/shared/pathutil.go
diff --git a/drive/driveimpl/shared/pathutil_test.go b/tailfs/tailfsimpl/shared/pathutil_test.go
index 662adbd8b..662adbd8b 100644
--- a/drive/driveimpl/shared/pathutil_test.go
+++ b/tailfs/tailfsimpl/shared/pathutil_test.go
diff --git a/drive/driveimpl/shared/readonlydir.go b/tailfs/tailfsimpl/shared/readonlydir.go
index 0d63fd2d0..0d63fd2d0 100644
--- a/drive/driveimpl/shared/readonlydir.go
+++ b/tailfs/tailfsimpl/shared/readonlydir.go
diff --git a/drive/driveimpl/shared/stat.go b/tailfs/tailfsimpl/shared/stat.go
index d8022894c..d8022894c 100644
--- a/drive/driveimpl/shared/stat.go
+++ b/tailfs/tailfsimpl/shared/stat.go
diff --git a/drive/driveimpl/drive_test.go b/tailfs/tailfsimpl/tailfs_test.go
index 317c44c4f..96b7b05a7 100644
--- a/drive/driveimpl/drive_test.go
+++ b/tailfs/tailfsimpl/tailfs_test.go
@@ -1,7 +1,7 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
-package driveimpl
+package tailfsimpl
import (
"fmt"
@@ -20,8 +20,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/studio-b12/gowebdav"
- "tailscale.com/drive"
- "tailscale.com/drive/driveimpl/shared"
+ "tailscale.com/tailfs"
+ "tailscale.com/tailfs/tailfsimpl/shared"
"tailscale.com/tstest"
)
@@ -38,7 +38,7 @@ const (
func init() {
// set AllowShareAs() to false so that we don't try to use sub-processes
// for access files on disk.
- drive.DisallowShareAs = true
+ tailfs.DisallowShareAs = true
}
// The tests in this file simulate real-life TailFS scenarios, but without
@@ -51,9 +51,9 @@ func TestDirectoryListing(t *testing.T) {
s.checkDirList("domain should contain its only remote", shared.Join(domain), remote1)
s.checkDirList("remote with no shares should be empty", shared.Join(domain, remote1))
- s.addShare(remote1, share11, drive.PermissionReadWrite)
+ s.addShare(remote1, share11, tailfs.PermissionReadWrite)
s.checkDirList("remote with one share should contain that share", shared.Join(domain, remote1), share11)
- s.addShare(remote1, share12, drive.PermissionReadOnly)
+ s.addShare(remote1, share12, tailfs.PermissionReadOnly)
s.checkDirList("remote with two shares should contain both in lexicographical order", shared.Join(domain, remote1), share12, share11)
s.writeFile("writing file to read/write remote should succeed", remote1, share11, file111, "hello world", true)
s.checkDirList("remote share should contain file", shared.Join(domain, remote1, share11), file111)
@@ -76,12 +76,12 @@ func TestFileManipulation(t *testing.T) {
s := newSystem(t)
s.addRemote(remote1)
- s.addShare(remote1, share11, drive.PermissionReadWrite)
+ s.addShare(remote1, share11, tailfs.PermissionReadWrite)
s.writeFile("writing file to read/write remote should succeed", remote1, share11, file111, "hello world", true)
s.checkFileStatus(remote1, share11, file111)
s.checkFileContents(remote1, share11, file111)
- s.addShare(remote1, share12, drive.PermissionReadOnly)
+ s.addShare(remote1, share12, tailfs.PermissionReadOnly)
s.writeFile("writing file to read-only remote should fail", remote1, share12, file111, "hello world", false)
s.writeFile("writing file to non-existent remote should fail", "non-existent", share11, file111, "hello world", false)
@@ -98,7 +98,7 @@ type remote struct {
fs *FileSystemForRemote
fileServer *FileServer
shares map[string]string
- permissions map[string]drive.Permission
+ permissions map[string]tailfs.Permission
mu sync.RWMutex
}
@@ -175,15 +175,15 @@ func (s *system) addRemote(name string) {
fileServer: fileServer,
fs: NewFileSystemForRemote(log.Printf),
shares: make(map[string]string),
- permissions: make(map[string]drive.Permission),
+ permissions: make(map[string]tailfs.Permission),
}
r.fs.SetFileServerAddr(fileServer.Addr())
go http.Serve(l, r)
s.remotes[name] = r
- remotes := make([]*drive.Remote, 0, len(s.remotes))
+ remotes := make([]*tailfs.Remote, 0, len(s.remotes))
for name, r := range s.remotes {
- remotes = append(remotes, &drive.Remote{
+ remotes = append(remotes, &tailfs.Remote{
Name: name,
URL: fmt.Sprintf("http://%s", r.l.Addr()),
})
@@ -197,7 +197,7 @@ func (s *system) addRemote(name string) {
})
}
-func (s *system) addShare(remoteName, shareName string, permission drive.Permission) {
+func (s *system) addShare(remoteName, shareName string, permission tailfs.Permission) {
r, ok := s.remotes[remoteName]
if !ok {
s.t.Fatalf("unknown remote %q", remoteName)
@@ -207,14 +207,14 @@ func (s *system) addShare(remoteName, shareName string, permission drive.Permiss
r.shares[shareName] = f
r.permissions[shareName] = permission
- shares := make([]*drive.Share, 0, len(r.shares))
+ shares := make([]*tailfs.Share, 0, len(r.shares))
for shareName, folder := range r.shares {
- shares = append(shares, &drive.Share{
+ shares = append(shares, &tailfs.Share{
Name: shareName,
Path: folder,
})
}
- slices.SortFunc(shares, drive.CompareShares)
+ slices.SortFunc(shares, tailfs.CompareShares)
r.fs.SetShares(shares)
r.fileServer.SetShares(r.shares)
}
diff --git a/tsd/tsd.go b/tsd/tsd.go
index ef369f8b8..21ebb6a4a 100644
--- a/tsd/tsd.go
+++ b/tsd/tsd.go
@@ -22,7 +22,6 @@ import (
"reflect"
"tailscale.com/control/controlknobs"
- "tailscale.com/drive"
"tailscale.com/ipn"
"tailscale.com/ipn/conffile"
"tailscale.com/net/dns"
@@ -30,6 +29,7 @@ import (
"tailscale.com/net/tsdial"
"tailscale.com/net/tstun"
"tailscale.com/proxymap"
+ "tailscale.com/tailfs"
"tailscale.com/types/netmap"
"tailscale.com/wgengine"
"tailscale.com/wgengine/magicsock"
@@ -48,8 +48,8 @@ type System struct {
Tun SubSystem[*tstun.Wrapper]
StateStore SubSystem[ipn.StateStore]
Netstack SubSystem[NetstackImpl] // actually a *netstack.Impl
- TailFSForLocal SubSystem[drive.FileSystemForLocal]
- TailFSForRemote SubSystem[drive.FileSystemForRemote]
+ TailFSForLocal SubSystem[tailfs.FileSystemForLocal]
+ TailFSForRemote SubSystem[tailfs.FileSystemForRemote]
// InitialConfig is initial server config, if any.
// It is nil if the node is not in declarative mode.
@@ -101,9 +101,9 @@ func (s *System) Set(v any) {
s.StateStore.Set(v)
case NetstackImpl:
s.Netstack.Set(v)
- case drive.FileSystemForLocal:
+ case tailfs.FileSystemForLocal:
s.TailFSForLocal.Set(v)
- case drive.FileSystemForRemote:
+ case tailfs.FileSystemForRemote:
s.TailFSForRemote.Set(v)
default:
panic(fmt.Sprintf("unknown type %T", v))
diff --git a/tstest/integration/tailscaled_deps_test_darwin.go b/tstest/integration/tailscaled_deps_test_darwin.go
index 3d5ec99f9..ad47de941 100644
--- a/tstest/integration/tailscaled_deps_test_darwin.go
+++ b/tstest/integration/tailscaled_deps_test_darwin.go
@@ -15,7 +15,6 @@ import (
_ "tailscale.com/cmd/tailscaled/childproc"
_ "tailscale.com/control/controlclient"
_ "tailscale.com/derp/derphttp"
- _ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/conffile"
@@ -39,6 +38,7 @@ import (
_ "tailscale.com/ssh/tailssh"
_ "tailscale.com/syncs"
_ "tailscale.com/tailcfg"
+ _ "tailscale.com/tailfs/tailfsimpl"
_ "tailscale.com/tsd"
_ "tailscale.com/tsweb/varz"
_ "tailscale.com/types/flagtype"
diff --git a/tstest/integration/tailscaled_deps_test_freebsd.go b/tstest/integration/tailscaled_deps_test_freebsd.go
index 3d5ec99f9..ad47de941 100644
--- a/tstest/integration/tailscaled_deps_test_freebsd.go
+++ b/tstest/integration/tailscaled_deps_test_freebsd.go
@@ -15,7 +15,6 @@ import (
_ "tailscale.com/cmd/tailscaled/childproc"
_ "tailscale.com/control/controlclient"
_ "tailscale.com/derp/derphttp"
- _ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/conffile"
@@ -39,6 +38,7 @@ import (
_ "tailscale.com/ssh/tailssh"
_ "tailscale.com/syncs"
_ "tailscale.com/tailcfg"
+ _ "tailscale.com/tailfs/tailfsimpl"
_ "tailscale.com/tsd"
_ "tailscale.com/tsweb/varz"
_ "tailscale.com/types/flagtype"
diff --git a/tstest/integration/tailscaled_deps_test_linux.go b/tstest/integration/tailscaled_deps_test_linux.go
index 3d5ec99f9..ad47de941 100644
--- a/tstest/integration/tailscaled_deps_test_linux.go
+++ b/tstest/integration/tailscaled_deps_test_linux.go
@@ -15,7 +15,6 @@ import (
_ "tailscale.com/cmd/tailscaled/childproc"
_ "tailscale.com/control/controlclient"
_ "tailscale.com/derp/derphttp"
- _ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/conffile"
@@ -39,6 +38,7 @@ import (
_ "tailscale.com/ssh/tailssh"
_ "tailscale.com/syncs"
_ "tailscale.com/tailcfg"
+ _ "tailscale.com/tailfs/tailfsimpl"
_ "tailscale.com/tsd"
_ "tailscale.com/tsweb/varz"
_ "tailscale.com/types/flagtype"
diff --git a/tstest/integration/tailscaled_deps_test_openbsd.go b/tstest/integration/tailscaled_deps_test_openbsd.go
index 3d5ec99f9..ad47de941 100644
--- a/tstest/integration/tailscaled_deps_test_openbsd.go
+++ b/tstest/integration/tailscaled_deps_test_openbsd.go
@@ -15,7 +15,6 @@ import (
_ "tailscale.com/cmd/tailscaled/childproc"
_ "tailscale.com/control/controlclient"
_ "tailscale.com/derp/derphttp"
- _ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/conffile"
@@ -39,6 +38,7 @@ import (
_ "tailscale.com/ssh/tailssh"
_ "tailscale.com/syncs"
_ "tailscale.com/tailcfg"
+ _ "tailscale.com/tailfs/tailfsimpl"
_ "tailscale.com/tsd"
_ "tailscale.com/tsweb/varz"
_ "tailscale.com/types/flagtype"
diff --git a/tstest/integration/tailscaled_deps_test_windows.go b/tstest/integration/tailscaled_deps_test_windows.go
index 240c58c13..0f84a46b2 100644
--- a/tstest/integration/tailscaled_deps_test_windows.go
+++ b/tstest/integration/tailscaled_deps_test_windows.go
@@ -22,7 +22,6 @@ import (
_ "tailscale.com/cmd/tailscaled/childproc"
_ "tailscale.com/control/controlclient"
_ "tailscale.com/derp/derphttp"
- _ "tailscale.com/drive/driveimpl"
_ "tailscale.com/envknob"
_ "tailscale.com/ipn"
_ "tailscale.com/ipn/conffile"
@@ -46,6 +45,7 @@ import (
_ "tailscale.com/safesocket"
_ "tailscale.com/syncs"
_ "tailscale.com/tailcfg"
+ _ "tailscale.com/tailfs/tailfsimpl"
_ "tailscale.com/tsd"
_ "tailscale.com/tsweb/varz"
_ "tailscale.com/types/flagtype"
diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go
index 46de3ebb4..7e7beca3e 100644
--- a/wgengine/netstack/netstack.go
+++ b/wgengine/netstack/netstack.go
@@ -36,7 +36,6 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
"gvisor.dev/gvisor/pkg/tcpip/transport/udp"
"gvisor.dev/gvisor/pkg/waiter"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/ipn/ipnlocal"
"tailscale.com/metrics"
@@ -49,6 +48,7 @@ import (
"tailscale.com/proxymap"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/types/ipproto"
"tailscale.com/types/logger"
"tailscale.com/types/netmap"
@@ -189,7 +189,7 @@ type Impl struct {
ctxCancel context.CancelFunc // called on Close
lb *ipnlocal.LocalBackend // or nil
dns *dns.Manager
- tailFSForLocal drive.FileSystemForLocal // or nil
+ tailFSForLocal tailfs.FileSystemForLocal // or nil
peerapiPort4Atomic atomic.Uint32 // uint16 port number for IPv4 peerapi
peerapiPort6Atomic atomic.Uint32 // uint16 port number for IPv6 peerapi
@@ -248,7 +248,7 @@ const nicID = 1
const maxUDPPacketSize = tstun.MaxPacketSize
// Create creates and populates a new Impl.
-func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magicsock.Conn, dialer *tsdial.Dialer, dns *dns.Manager, pm *proxymap.Mapper, tailFSForLocal drive.FileSystemForLocal) (*Impl, error) {
+func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magicsock.Conn, dialer *tsdial.Dialer, dns *dns.Manager, pm *proxymap.Mapper, tailFSForLocal tailfs.FileSystemForLocal) (*Impl, error) {
if mc == nil {
return nil, errors.New("nil magicsock.Conn")
}
diff --git a/wgengine/userspace.go b/wgengine/userspace.go
index 2ad48a15a..b35e792bd 100644
--- a/wgengine/userspace.go
+++ b/wgengine/userspace.go
@@ -21,7 +21,6 @@ import (
"github.com/tailscale/wireguard-go/device"
"github.com/tailscale/wireguard-go/tun"
"tailscale.com/control/controlknobs"
- "tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/health"
"tailscale.com/ipn/ipnstate"
@@ -36,6 +35,7 @@ import (
"tailscale.com/net/tstun"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
+ "tailscale.com/tailfs"
"tailscale.com/tstime/mono"
"tailscale.com/types/dnstype"
"tailscale.com/types/ipproto"
@@ -206,7 +206,7 @@ type Config struct {
// TailFSForLocal, if populated, will cause the engine to expose a TailFS
// listener at 100.100.100.100:8080.
- TailFSForLocal drive.FileSystemForLocal
+ TailFSForLocal tailfs.FileSystemForLocal
}
// NewFakeUserspaceEngine returns a new userspace engine for testing.