filestash README

The project's README from github.com/mickael-kerjean/filestash. As one markdown file: README.md.

screenshot

What is this?

Filestash started as a storage agnostic Dropbox-like file manager that speaks every storage protocol (FTP, SFTP, S3, SMB, WebDAV, IPFS, and about 20 more). It grew into what we want to be the world's best file management platform, centered around 3 separate products:

  1. Web client (the file manager available from your browser): documentation / screenshot / demo
  2. Native client (to sync your data on your device): repo / screenshots for mac, windows, linux, android & iphone
  3. Gateways (to expose your storages over any protocol): showcase

The philosophy that guides this project is: "anything that's not a fundamental truth of the universe lives in a plugin". That keeps the core lean and fast, and the opinions replaceable, so when your requirements get deep or weird, the answer is a plugin, not a fork. You only carry the bloat you really need.

storage + auth architecture

Key Features

Plugins

Malleability isn't an afterthought, it's the whole architecture:

anything that's not a fundamental truth of the universe lives in a plugin

Taken literally, the "truths of the universe" are a set of core interfaces, one for every key component of Filestash, and they're yours to implement (storage, authentication, authorisation, search, thumbnailing, apps, middleware, frontend changes, ...)

The oldest one is the storage interface, the one at work whenever you connect to a storage:

type IBackend interface {
	Ls(path string) ([]os.FileInfo, error)
	Stat(path string) (os.FileInfo, error)
	Cat(path string) (io.ReadCloser, error)
	Mkdir(path string) error
	Rm(path string) error
	Mv(from string, to string) error
	Save(path string, file io.Reader) error
	Touch(path string) error
}

Historically, plugins were made in Go and compiled in. Today there's a second path: runtime plugins, a zip you drop in the plugins folder. The zip can reshape the frontend and it can carry wasm implementing the very same core interfaces. That wasm runs in a VM with tight control on permissions: no declared network host, no way to phone home. Installing a plugin doesn't mean trusting it with everything.

For example:

use filestash::*;

#[derive(Default)]
pub struct Plugin;

impl Authorisation for Plugin {
    fn ls(&self, _ctx: &Context, path: &str) -> Decision {
        self.check(path)
    }
    fn cat(&self, _ctx: &Context, path: &str) -> Decision { ... }
    fn stat(&self, _ctx: &Context, path: &str) -> Decision { ... }
}

impl Plugin {
    fn check(&self, path: &str) -> Decision {
        if path.split("/").any(|segment| segment == "top_secret") {
            log::warn!("[TOPSECRET] access denied !!");
            return Decision::Deny;
        }
        Decision::Allow
    }
}

register!(Plugin: Authorisation);

These few lines give you a readonly view of your data where every folder named "top_secret" is off limits. For more examples, browse the plugin folder, the runtime plugin cookbook, and the plugin marketplace.

And to be clear, code is the power-user path, there are no code options

Getting Started

To install Filestash, head to the Getting started guide. If you want to leverage plugins, head over to the inventory, or learn about developing your own plugins.

Support

Why

Familiar with the infamous comment from Dropbox's launch on HN? In my memory it goes like this:

Credits

Filestash stands on the shoulder of: contributors, folks developing awesome libraries, BrandonM, a whole bunch of C stuff (the C standard library, libjpeg, libpng, libgif, libraw and many more), fontawesome, material, Browser stack to let us test on real devices, and the many guys from Nebraska and elsewhere who have been thanklessly maintaining the critical pieces that Filestash sits on top:

credit to the nebraska guy on xkcd

filestash (mickael-kerjean/filestash)

Searching Database…

14.8K ·GitHub
这是什么?Filestash 是一款与存储后端无关、类似 Dropbox 的文件管理器,几乎支持所有存储协议(S3、FTP、SFTP、WebDAV、SMB、NFS、Git、IPFS、Dropbox、Azure、SharePoint 等),因此你只需一个文件浏览器就能管理所有后端存储。
这只是个网页文件管理器,还是功能更多?它其实是三款产品合一:一个可以在浏览器中使用的网页客户端、一个用于把文件同步到设备上的原生客户端,以及可通过其他协议对外提供存储访问的网关。
我该怎么把它跑起来?你需要按照官方 Getting Started 指南,将它自行部署为自托管服务器;文档中并未描述托管式 SaaS 版本。
用插件扩展它,我需要会 Go 语言吗?不一定。编译型 Go 插件是传统方式,但你也可以直接放入以 zip 压缩包形式提供、包含 WASM 的运行时插件,无需重新编译服务器。
装上的插件能随意操作我的服务器吗?不能。运行时插件在受限的 WASM 虚拟机中执行,且未声明网络访问权限,因此安装插件并不会自动赋予其完全信任。
我可以连接哪些存储后端?S3、FTP、SFTP、WebDAV、SMB、NFS、Git、IPFS、Dropbox、Azure 和 SharePoint 都在官方列出的后端之列,因为存储层只是插件接口的其中一种。
为什么要做一个新的文件管理器,而不直接用 Dropbox?项目的理念是“凡不是宇宙基本真理的东西,都应放在插件里”。这样核心保持精简,你可以接入已有的任何存储,而不必被绑定在某一家供应商上。
除了浏览文件,它还能做什么?除浏览文件外,它还支持版本管理、审计日志、杀毒扫描、配额管理、聊天、Chromecast 投屏、按需视频转码,以及将共享链接挂载为网络驱动器。
插件市场是什么?这是一个现成插件和文件应用的目录(包括 SVG 等格式的查看器、主题界面、AI/OCR 功能等),你无需自己编写任何代码即可安装。
What are similar projects?sftpgo, alist, rclone, copyparty, ceph, OpenList, cloudreve, filebrowser
Size
73 MB
Stars
14.8K
Updated
CommitOct 16
Age
9y
Commits · 90 Days