[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5505":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},5505,"dufs","sigoden\u002Fdufs","sigoden","A file server that supports static serving, uploading, searching, accessing control, webdav...","",null,"Rust",10274,547,52,3,0,27,153,14,43.22,"Other",false,"main",[25,26,27,28,29,30,31,32],"cloud-disk","command-line","file-sharing","file-upload-server","rust","static-server","webdav","webdav-server","2026-06-12 02:01:11","# Dufs\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs\u002Factions\u002Fworkflows\u002Fci.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs\u002Factions\u002Fworkflows\u002Fci.yaml)\n[![Crates](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fdufs.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fdufs)\n[![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fsigoden\u002Fdufs)](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fsigoden\u002Fdufs)\n\nDufs is a distinctive utility file server that supports static serving, uploading, searching, accessing control, webdav...\n\n![demo](https:\u002F\u002Fuser-images.githubusercontent.com\u002F4012553\u002F220513063-ff0f186b-ac54-4682-9af4-47a9781dee0d.png)\n\n## Features\n\n- Serve static files\n- Download folder as zip file\n- Upload files and folders (Drag & Drop)\n- Create\u002FEdit\u002FSearch files\n- Resumable\u002Fpartial uploads\u002Fdownloads\n- Access control\n- Support https\n- Support webdav\n- Easy to use with curl\n\n## Install\n\n### With cargo\n\n```\ncargo install dufs\n```\n\n### With docker\n\n```\ndocker run -v `pwd`:\u002Fdata -p 5000:5000 --rm sigoden\u002Fdufs \u002Fdata -A\n```\n\n### With [Homebrew](https:\u002F\u002Fbrew.sh)\n\n```\nbrew install dufs\n```\n\n### Binaries on macOS, Linux, Windows\n\nDownload from [Github Releases](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs\u002Freleases), unzip and add dufs to your $PATH.\n\n## CLI\n\n```\nDufs is a distinctive utility file server - https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs\n\nUsage: dufs [OPTIONS] [serve-path]\n\nArguments:\n  [serve-path]  Specific path to serve [default: .]\n\nOptions:\n  -c, --config \u003Cfile>        Specify configuration file\n  -b, --bind \u003Caddrs>         Specify bind address or unix socket\n  -p, --port \u003Cport>          Specify port to listen on [default: 5000]\n      --path-prefix \u003Cpath>   Specify a path prefix\n      --hidden \u003Cvalue>       Hide paths from directory listings, e.g. tmp,*.log,*.lock\n  -a, --auth \u003Crules>         Add auth roles, e.g. user:pass@\u002Fdir1:rw,\u002Fdir2\n  -A, --allow-all            Allow all operations\n      --allow-upload         Allow upload files\u002Ffolders\n      --allow-delete         Allow delete files\u002Ffolders\n      --allow-search         Allow search files\u002Ffolders\n      --allow-symlink        Allow symlink to files\u002Ffolders outside root directory\n      --allow-archive        Allow download folders as archive file\n      --allow-hash           Allow ?hash query to get file sha256 hash\n      --enable-cors          Enable CORS, sets `Access-Control-Allow-Origin: *`\n      --render-index         Serve index.html when requesting a directory, returns 404 if not found index.html\n      --render-try-index     Serve index.html when requesting a directory, returns directory listing if not found index.html\n      --render-spa           Serve SPA(Single Page Application)\n      --assets \u003Cpath>        Set the path to the assets directory for overriding the built-in assets\n      --log-format \u003Cformat>  Customize http log format\n      --log-file \u003Cfile>      Specify the file to save logs to, other than stdout\u002Fstderr\n      --compress \u003Clevel>     Set zip compress level [default: low] [possible values: none, low, medium, high]\n      --completions \u003Cshell>  Print shell completion script for \u003Cshell> [possible values: bash, elvish, fish, powershell, zsh]\n      --tls-cert \u003Cpath>      Path to an SSL\u002FTLS certificate to serve with HTTPS\n      --tls-key \u003Cpath>       Path to the SSL\u002FTLS certificate's private key\n  -h, --help                 Print help\n  -V, --version              Print version\n```\n\n## Examples\n\nServe current working directory in read-only mode\n\n```\ndufs\n```\n\nAllow all operations like upload\u002Fdelete\u002Fsearch\u002Fcreate\u002Fedit...\n\n```\ndufs -A\n```\n\nOnly allow upload operation\n\n```\ndufs --allow-upload\n```\n\nServe a specific directory\n\n```\ndufs Downloads\n```\n\nServe a single file\n\n```\ndufs linux-distro.iso\n```\n\nServe a single-page application like react\u002Fvue\n\n```\ndufs --render-spa\n```\n\nServe a static website with index.html\n\n```\ndufs --render-index\n```\n\nRequire username\u002Fpassword\n\n```\ndufs -a admin:123@\u002F:rw\n```\n\nListen on specific host:ip \n\n```\ndufs -b 127.0.0.1 -p 80\n```\n\nListen on unix socket\n```\ndufs -b \u002Ftmp\u002Fdufs.socket\n```\n\nUse https\n\n```\ndufs --tls-cert my.crt --tls-key my.key\n```\n\n## API\n\nUpload a file\n\n```sh\ncurl -T path-to-file http:\u002F\u002F127.0.0.1:5000\u002Fnew-path\u002Fpath-to-file\n```\n\nDownload a file\n```sh\ncurl http:\u002F\u002F127.0.0.1:5000\u002Fpath-to-file           # download the file\ncurl http:\u002F\u002F127.0.0.1:5000\u002Fpath-to-file?hash      # retrieve the sha256 hash of the file\n```\n\nDownload a folder as zip file\n\n```sh\ncurl -o path-to-folder.zip http:\u002F\u002F127.0.0.1:5000\u002Fpath-to-folder?zip\n```\n\nDelete a file\u002Ffolder\n\n```sh\ncurl -X DELETE http:\u002F\u002F127.0.0.1:5000\u002Fpath-to-file-or-folder\n```\n\nCreate a directory\n\n```sh\ncurl -X MKCOL http:\u002F\u002F127.0.0.1:5000\u002Fpath-to-folder\n```\n\nMove the file\u002Ffolder to the new path\n\n```sh\ncurl -X MOVE http:\u002F\u002F127.0.0.1:5000\u002Fpath -H \"Destination: http:\u002F\u002F127.0.0.1:5000\u002Fnew-path\"\n```\n\nList\u002Fsearch directory contents\n\n```sh\ncurl http:\u002F\u002F127.0.0.1:5000?q=Dockerfile           # search for files, similar to `find -name Dockerfile`\ncurl http:\u002F\u002F127.0.0.1:5000?simple                 # output names only, similar to `ls -1`\ncurl http:\u002F\u002F127.0.0.1:5000?json                   # output paths in json format\n```\n\nWith authorization (Both basic or digest auth works)\n\n```sh\ncurl http:\u002F\u002F127.0.0.1:5000\u002Ffile --user user:pass                 # basic auth\ncurl http:\u002F\u002F127.0.0.1:5000\u002Ffile --user user:pass --digest        # digest auth\n```\n\nResumable downloads\n\n```sh\ncurl -C- -o file http:\u002F\u002F127.0.0.1:5000\u002Ffile\n```\n\nResumable uploads\n\n```sh\nupload_offset=$(curl -I -s http:\u002F\u002F127.0.0.1:5000\u002Ffile | tr -d '\\r' | sed -n 's\u002Fcontent-length: \u002F\u002Fp')\ndd skip=$upload_offset if=file status=none ibs=1 | \\\n  curl -X PATCH -H \"X-Update-Range: append\" --data-binary @- http:\u002F\u002F127.0.0.1:5000\u002Ffile\n```\n\nHealth checks\n\n```sh\ncurl http:\u002F\u002F127.0.0.1:5000\u002F__dufs__\u002Fhealth\n```\n\n\u003Cdetails>\n\u003Csummary>\u003Ch2>Advanced Topics\u003C\u002Fh2>\u003C\u002Fsummary>\n\n### Access Control\n\nDufs supports account based access control. You can control who can do what on which path with `--auth`\u002F`-a`.\n\n```\ndufs -a admin:admin@\u002F:rw -a guest:guest@\u002F\ndufs -a user:pass@\u002F:rw,\u002Fdir1 -a @\u002F\n```\n\n1. Use `@` to separate the account and paths. No account means anonymous user.\n2. Use `:` to separate the username and password of the account.\n3. Use `,` to separate paths.\n4. Use path suffix `:rw`\u002F`:ro` set permissions: `read-write`\u002F`read-only`. `:ro` can be omitted.\n\n- `-a admin:admin@\u002F:rw`: `admin` has complete permissions for all paths.\n- `-a guest:guest@\u002F`: `guest` has read-only permissions for all paths.\n- `-a user:pass@\u002F:rw,\u002Fdir1`: `user` has read-write permissions for `\u002F*`, has read-only permissions for `\u002Fdir1\u002F*`.\n- `-a @\u002F`: All paths is publicly accessible, everyone can view\u002Fdownload it.\n\n**Auth permissions are restricted by dufs global permissions.** If dufs does not enable upload permissions via `--allow-upload`, then the account will not have upload permissions even if it is granted `read-write`(`:rw`) permissions.\n\n#### Hashed Password\n\nDUFS supports the use of sha-512 hashed password.\n\nCreate hashed password:\n\n```sh\n$ openssl passwd -6 123456 # or `mkpasswd -m sha-512 123456`\n$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs\u002F\n```\n\nUse hashed password:\n\n```sh\ndufs -a 'admin:$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s07GgCIO69KcPBRuwPE5tDq05xMAzye0NxVKuJdYs\u002F@\u002F:rw'\n```\n> The hashed password contains `$6`, which can expand to a variable in some shells, so you have to use **single quotes** to wrap it.\n\nTwo important things for hashed passwords:\n\n1. Dufs only supports sha-512 hashed passwords, so ensure that the password string always starts with `$6$`.\n2. Digest authentication does not function properly with hashed passwords.\n\n\n### Hide Paths\n\nDufs supports hiding paths from directory listings via option `--hidden \u003Cglob>,...`.\n\n```\ndufs --hidden .git,.DS_Store,tmp\n```\n\n> The glob used in --hidden only matches file and directory names, not paths. So `--hidden dir1\u002Ffile` is invalid.\n\n```sh\ndufs --hidden '.*'                          # hidden dotfiles\ndufs --hidden '*\u002F'                          # hidden all folders\ndufs --hidden '*.log,*.lock'                # hidden by exts\ndufs --hidden '*.log' --hidden '*.lock'\n```\n\n### Log Format\n\nDufs supports customize http log format with option `--log-format`.\n\nThe log format can use following variables.\n\n| variable     | description                                                               |\n| ------------ | ------------------------------------------------------------------------- |\n| $remote_addr | client address                                                            |\n| $remote_user | user name supplied with authentication                                    |\n| $request     | full original request line                                                |\n| $status      | response status                                                           |\n| $http_       | arbitrary request header field. examples: $http_user_agent, $http_referer |\n\n\nThe default log format is `'$time_iso8601 $log_level - $remote_addr \"$request\" $status`.\n```\n2022-08-06T06:59:31+08:00 INFO - 127.0.0.1 \"GET \u002F\" 200\n```\n\nA json log format is also supported.\n```\ndufs --log-format '{\"time\":\"$time_local\",\"addr\":\"$remote_addr\",\"uri\":\"$request_uri\", \"method\":\"$request_method\",\"status\":$status}'\n\n{\"time\":\"2022-08-06T06:59:31+08:00\",\"addr\":\"127.0.0.1\",\"uri\":\"\u002F\", \"method\":\"GET\",\"status\":200}\n```\n\nDisable http log\n```\ndufs --log-format=''\n```\n\nLog user-agent\n```\ndufs --log-format '$remote_addr \"$request\" $status $http_user_agent'\n```\n```\n2022-08-06T06:53:55+08:00 INFO - 127.0.0.1 \"GET \u002F\" 200 Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F104.0.0.0 Safari\u002F537.36\n```\n\nLog remote-user\n```\ndufs --log-format '$remote_addr $remote_user \"$request\" $status' -a \u002F@admin:admin -a \u002Ffolder1@user1:pass1\n```\n```\n2022-08-06T07:04:37+08:00 INFO - 127.0.0.1 admin \"GET \u002F\" 200\n```\n\n## Environment variables\n\nAll options can be set using environment variables prefixed with `DUFS_`.\n\n```\n[serve-path]                DUFS_SERVE_PATH=\".\"\n    --config \u003Cfile>         DUFS_CONFIG=config.yaml\n-b, --bind \u003Caddrs>          DUFS_BIND=0.0.0.0\n-p, --port \u003Cport>           DUFS_PORT=5000\n    --path-prefix \u003Cpath>    DUFS_PATH_PREFIX=\u002Fdufs\n    --hidden \u003Cvalue>        DUFS_HIDDEN=tmp,*.log,*.lock\n-a, --auth \u003Crules>          DUFS_AUTH=\"admin:admin@\u002F:rw|@\u002F\" \n-A, --allow-all             DUFS_ALLOW_ALL=true\n    --allow-upload          DUFS_ALLOW_UPLOAD=true\n    --allow-delete          DUFS_ALLOW_DELETE=true\n    --allow-search          DUFS_ALLOW_SEARCH=true\n    --allow-symlink         DUFS_ALLOW_SYMLINK=true\n    --allow-archive         DUFS_ALLOW_ARCHIVE=true\n    --allow-hash            DUFS_ALLOW_HASH=true\n    --enable-cors           DUFS_ENABLE_CORS=true\n    --render-index          DUFS_RENDER_INDEX=true\n    --render-try-index      DUFS_RENDER_TRY_INDEX=true\n    --render-spa            DUFS_RENDER_SPA=true\n    --assets \u003Cpath>         DUFS_ASSETS=.\u002Fassets\n    --log-format \u003Cformat>   DUFS_LOG_FORMAT=\"\"\n    --log-file \u003Cfile>       DUFS_LOG_FILE=.\u002Fdufs.log\n    --compress \u003Ccompress>   DUFS_COMPRESS=low\n    --tls-cert \u003Cpath>       DUFS_TLS_CERT=cert.pem\n    --tls-key \u003Cpath>        DUFS_TLS_KEY=key.pem\n```\n\n## Configuration File\n\nYou can specify and use the configuration file by selecting the option `--config \u003Cpath-to-config.yaml>`.\n\nThe following are the configuration items:\n\n```yaml\nserve-path: '.'\nbind: 0.0.0.0\nport: 5000\npath-prefix: \u002Fdufs\nhidden:\n  - tmp\n  - '*.log'\n  - '*.lock'\nauth:\n  - admin:admin@\u002F:rw\n  - user:pass@\u002Fsrc:rw,\u002Fshare\n  - '@\u002F'  # According to the YAML spec, quoting is required.\nallow-all: false\nallow-upload: true\nallow-delete: true\nallow-search: true\nallow-symlink: true\nallow-archive: true\nallow-hash: true\nenable-cors: true\nrender-index: true\nrender-try-index: true\nrender-spa: true\nassets: .\u002Fassets\u002F\nlog-format: '$remote_addr \"$request\" $status $http_user_agent'\nlog-file: .\u002Fdufs.log\ncompress: low\ntls-cert: tests\u002Fdata\u002Fcert.pem\ntls-key: tests\u002Fdata\u002Fkey_pkcs1.pem\n```\n\n### Customize UI\n\nDufs allows users to customize the UI with your own assets.\n\n```\ndufs --assets my-assets-dir\u002F\n```\n\n> If you only need to make slight adjustments to the current UI, you copy dufs's [assets](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fdufs\u002Ftree\u002Fmain\u002Fassets) directory and modify it accordingly. The current UI doesn't use any frameworks, just plain HTML\u002FJS\u002FCSS. As long as you have some basic knowledge of web development, it shouldn't be difficult to modify.\n\nYour assets folder must contains a `index.html` file.\n\n`index.html` can use the following placeholder variables to retrieve internal data.\n\n- `__INDEX_DATA__`: directory listing data\n- `__ASSETS_PREFIX__`: assets url prefix\n\n> A customized 404.html page is also supported.\n\n\u003C\u002Fdetails>\n\n## License\n\nCopyright (c) 2022-2024 dufs-developers.\n\ndufs is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the LICENSE-APACHE and LICENSE-MIT files for license details.\n","Dufs 是一个功能丰富的文件服务器，支持静态文件服务、上传、搜索、访问控制和WebDAV等功能。它使用Rust语言编写，具有高效率与安全性。核心功能包括静态文件服务、文件夹压缩下载、拖拽上传文件或文件夹、创建\u002F编辑\u002F搜索文件、断点续传以及通过配置实现的细粒度权限管理等。此外，Dufs还支持HTTPS加密传输及WebDAV协议，使得其在个人云存储、小型团队协作或是需要快速搭建简易文件共享平台的场景下尤为适用。安装方式多样，既可以通过Cargo、Docker进行部署，也提供了适用于macOS、Linux、Windows平台的二进制包。",2,"2026-06-11 03:03:42","top_language"]