laitimes

Dufs, a static file service developed by Rust

author:Yuncha rice

Brief introduction

dufs is a Rust language that supports static services, uploads, search, access control, and file services, and can be deployed in Windows, Mac, and Linux. Github link: https://github.com/sigoden/dufs

Dufs, a static file service developed by Rust

Browser access display

peculiarity

1 Developed by Rust

2 Download the folder as a zip file

3 Upload files and folders (drag and drop)

4 Create/Edit/Search Files

5 Recoverable/Partially Uploaded and Downloaded

6 Access Control

7 HTTPS is supported

8 WebDAV support

9 You can use curl to perform related operations

If you have an HTML website in the Dufs directory, you can browse all the pages.

Dufs, a static file service developed by Rust

Installation

Use cargo installation, docker deployment, Homebrew, etc. to install and use

operation

The following describes how to use DUFFS

Usage: dufs [OPTIONS] [serve-path]
Arguments:
[serve-path] Specific path to serve [default: .]
Options:
-c, --config <file> Specify configuration file
-b, --bind <addrs> Specify bind address or unix socket
-p, --port <port> Specify port to listen on [default: 5000]
--path-prefix <path> Specify a path prefix
--hidden <value> Hide paths from directory listings, e.g. tmp,*.log,*.lock
-a, --auth <rules> Add auth roles, e.g. user:pass@/dir1:rw,/dir2
-A, --allow-all Allow all operations
--allow-upload Allow upload files/folders
--allow-delete Allow delete files/folders
--allow-search Allow search files/folders
--allow-symlink Allow symlink to files/folders outside root directory
--allow-archive Allow zip archive generation
--enable-cors Enable CORS, sets `Access-Control-Allow-Origin: *`
--render-index Serve index.html when requesting a directory, returns 404 if not found index.html
--render-try-index Serve index.html when requesting a directory, returns directory listing if not found index.html
--render-spa Serve SPA(Single Page Application)
--assets <path> Set the path to the assets directory for overriding the built-in assets
--log-format <format> Customize http log format
--compress <level> Set zip compress level [default: low] [possible values: none, low, medium, high]
--completions <shell> Print shell completion script for <shell> [possible values: bash, elvish, fish, powershell, zsh]
--tls-cert <path> Path to an SSL/TLS certificate to serve with HTTPS
--tls-key <path> Path to the SSL/TLS certificate's private key
-h, --help Print help
-V, --version Print version           

summary

This is a relatively simple file service that has been used, and it can also be operated through the command line, etc., so it is worth trying

Read on