DeedleFake / trayscale

An unofficial GUI wrapper around the Tailscale CLI client.
MIT License
392 stars 14 forks source link

Add support for Taildrive #130

Open Jacalz opened 6 days ago

Jacalz commented 6 days ago

It would be very useful to integrate Taildrive (https://tailscale.com/kb/1369/taildrive) to make it more accessible.

Maybe allowing files and folder to be shared easily and maybe also viewing shared data? I suppose the latter might be possible to automate by mounting the drive so it can be shown in the file manager (Nautilus etc.).

DeedleFake commented 6 days ago

I've looked at it before, but the alpha state makes me worried that semantics could change and completely break whatever integration that I build for it. I have just looked at it again and it's very much not what I expected it to be. In order to mount the shared drives, for example, I need to install the davfs2 driver, which is in the AUR on Arch. The average Linux installation is likely not going to be able to mount the shared drives, so even that option isn't feasible.

I could probably add a way to manage shares on the current machine, and it looks like there are some limited WebDAV client features in the Tailscale packages so it might be possible to build a browser for the shared drives manually, but we'll see.

Have you used it on Windows and/or Mac? How does it work on there?

Jacalz commented 6 days ago

I have only shared from Linux but received from both Linux and iOS. Works great. Like you say, receiving on Linux might be hard to pull off as you need to install davfs2. It was easy enough on Fedora by just doing a sudo dnf install davfs2 but I presume that isn't as feasible in for example Flatpak. I don't know honestly but I understand that it might cause problems.

However, controlling which items are shared should be relatively straight forward. The commands to do this are super simple and do not require any davfs2 installation as far as I can tell (I set up shares to iOS before trying out Linux to Linux and installing davfs2). Implementing support for just doing this part of the protocol would be quite useful in my opinion.

DeedleFake commented 6 days ago

Managing shares definitely won't require davfs2, no. It looks like the required functionality is fairly straightforwardly provided by a small set of methods in the tailscale package and a field in ipnstate.Prefs.

DeedleFake commented 6 days ago

Looked around a bit. It turns out that Nautilus, GNOME's file manager, has WebDAV support via a GVFS plugin and a dav:// URL scheme. I could probably at the very least add a button somewhere conditionally based on whether drive:access is set on the current node that just opens dav://100.100.100.100:8080 in Nautilus or something. That might not work in KDE, though, and it almost definitely won't work in something like Sway or Hyprland.

Edit: Also, in my own testing, I can't seem to see the shares in there with any WebDAV client that I use, even if they're being shared from the machine that I'm currently on.

Edit 2: Never mind. I just misconfigured the ACLs.