开发者发布 Proton Drive Linux FUSE 挂载工具:实现按需下载与本地缓存同步

原标题:Show HN: Proton Drive for Linux
42AI 研判分

一款非官方开源工具通过 FUSE 虚拟文件系统将 Proton Drive 挂载为 Linux 本地目录,采用“懒加载”机制仅在读取时下载文件以节省带宽和磁盘空间。该工具利用 Proton 事件流处理远程变更失效,并将写入操作缓冲至本地临时文件后定时上传,目前处于早期测试阶段且由作者借助 AI 辅助开发。

关联知识实体

报道正文

本文目录4 个章节

A FUSE virtual filesystem that mounts Proton Drive as a local folder on Linux.

What it does

This package mounts your Proton Drive at a directory you choose. All the files and folders are listed from Proton's metadata directly. But we also don't download the file content from all your files either, instead the files are downloaded on demand when you read them. This is a "lazy" approach that saves bandwidth and disk space. Like Google Drive, Dropbox, OneDrive, etc.

Remote changes reach the mount through Proton's event feed, which invalidates the affected directory listings and cached file content. Writes are buffered to a local temp file and uploaded to Proton in full a set timeout when the file closes.

Status

This is early and unofficial. Not affiliated with, endorsed by, or supported by Proton AG.

I have tested the most common paths, like: read, write, create, delete, rename and move operations on one Proton Drive share. But everyone has a different setup, and I can't test them all.

Expect bugs. Report them on the issue tracker.

Quick start

See Quick start for a complete copy-paste flow.

Components

Your apps don't talk directly to proton. Reads and writes go through the kernel's FUSE layer to the mount daemon, which is the only piece that speaks to Proton's API. So all the communication is locked in this layer to avoid leaks of your credentials or data.

The tray, and any future developments (probably a GUI), talk to that same daemon over its local unix socket, falling back to a status file when the socket is not available. Ideally, it will stay working no matter what happens.

文本
flowchart LR
    App["User application"] --> Kernel["Kernel FUSE"]
    Kernel --> Daemon

subgraph Daemon["proton-drive-fs daemon"]
        direction LR
        FS["fusefs"] --> Drive["drive"] --> Auth["auth"]
    end

Daemon --> API["Proton API"]

Tray["Tray"] -->|"unix socket, status file"| Daemon
    GUI["Future things"] -.->|"unix socket, status file"| Daemon

作者发帖说明(HN):

Hello everyone, I wanted to share this small project that I have. It's born out of a necessity that I had, because Proton doesn't ship a Linux version of the drive yet (it's apparently coming out later this year but who knows?) and all the current solutions are hacky and wonky at best. But for the time being I really needed to mount my Proton drive on my Linux machine the way I mounted it on my Mac, so I (and my faithful AI slave) did this small utility that allows you to mount your Proton Drive in a FUSE FS like if it is a local folder.

It's fully written in Go because Proton's drive SDK and API libs are all in Go, and there's a community project on top of the reverse engineered proton API there too. I am not a Go developer, I know the foundations, so of course I used AI quite a lot, I am not super proud of it, but I am using it daily and testing it myself for a few months before releasing here.

Hope you like it, feedbacks are welcome, just please be mindful of the person on the other side :)