sigoden / dufs Goto Github PK
View Code? Open in Web Editor NEWA file server that supports static serving, uploading, searching, accessing control, webdav...
License: Other
A file server that supports static serving, uploading, searching, accessing control, webdav...
License: Other
Problem
./dufs --enable-cors -a /temp@admin:admin@* -a /@admin:admin -A -- folder
比较奇怪的问题, 账号权限都对, 在威联通挂载根目录 http://aa.com:5000/ 不行, 但是 http://aa.com:5000/temp 就可以
可能是qnap比较特殊,因为手机mixplorer就没问题. 问题比较小众, 只是想挂载为目录用, 对大部分不影响
Log
2022-07-11T08:12:57Z INFO - 18ip9 "PROPFIND /" - 401
2022-07-11T08:13:11Z INFO - 18ip9 "PROPFIND /temp" - 207
Environment:
bug反馈,当分享目标是单个文件的时候,--path-prefix参数失去作用。
举例说明:dufs.exe -p 80 --path-prefix 001 f:\dir123\123.mp4
此时http://127.0.0.1:80/001/ 和 http://127.0.0.1:80/ 均可访问到123.mp4文件
若分享目标是文件夹的时候,一切正常。
另,建议提供--random-route参数,随机生成字符串
建议,可以在网页上增加一个显示当前页面二维码的功能,多谢
duf.exe -p 9999 -- "Q:\ONEDRIVE\5T\OneDrive - automation\plc\松下a4a5接线.xlsx"
duf.exe -p 9999 -- Q:\ONEDRIVE\15G\OneDrive\USB设备共享\网盘\miniserver\CMD.bat
单个文件不能共享,能否解决一下 谢谢
I tried to write a web page suitable for "duf" by myself. The main layout was referenced from h5ai, and it was packaged with Webpack, but the packaged pictures were scattered. Can Web Static Directory Support be Added? When the browser requests any file, it requests the files in the "assets" directory.
There's another tool also called duf whose command is also duf
.
Various Linux distributions (Arch Linux, Debian, Nix, etc) already provide a package named duf
that provides the other duf
.
Proposal: Rename this tool to allow users to use it without name/file conflict.
I cannot bind address 0.0.0.0, as a result, i cannot use the public IP to access the file server.
I found out the source code of args.rs just filter out the address, why?
提交bug,0.15.0版本拖拽上传功能失效了,拖到页面没有自动完成上传
Problem
F:\测试文件.txt
,并往里面填入中文,保存为utf8
格式.\dufs.exe -p 80 F:\测试文件.txt
127.0.0.1
即可显示测试文件.txt
的内容,但是中文部分是乱码。测试文件.txt
文件内容为:
中文字体
english
如果将测试文件.txt
另存为带有BOM的UTF-8
,则Chrome上显示正常。
Environment:
It would be interesting to have an option to change from light mode to dark mode.
Problem
With some search terms I run into the following error:
$ dufs --allow-search -p 8080 -b 192.168.0.1
Listening on:
http://192.168.0.1:8080/
2022-07-02T14:53:42+02:00 INFO - 192.168.0.113 "GET /" - 200
thread 'tokio-runtime-worker' has overflowed its stack
fatal runtime error: stack overflow
Aborted
$
I don't see why this happens: some search terms don't work even though they yield fewer results than others that do work.
Whatever the cause might be, I think dufs
should try to return an error page with (maybe with HTTP 500 or 503) instead of terminating completely. I'd rather not start dufs
in a while (true)
loop. 😉
Log
See above.
Environment:
Problem
Im trying to upload files to a Dufs server from an other server over http.
For this I run the Dufs server with this command, to anable CORS: dufs -A --enable-cors
But the PUT Request I send to the Server is blocked with the following error message:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at xxx. (Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’).
After looking in to the server.rs I found that in the add_cors function only the AccessControlAllowOrigin
, AccessControlAllowCredentials
and AccessControlAllowHeaders
headers are set. However WebDav needs the PUT method and therefor the AccessControlAllowMethods
header is needed.
Environment:
I'm experiencing issues when extracting files form an zip-archive. Downloading the individual .jpg files works fine, but they become corrupted during the zipping process and/or download.
Version: 0.22.0
OS: Ubuntu 18.04
Browser: FF 99.0
Hi sigoden, thanks for your development, this tool helps me a lot. Just love it.
Sometimes, when I upload new files and want to classify them from previous ones, I will create a folder and put them is there.
Since dufs does not support creating new folder on web UI, I have to go to the terminal and run mkdir command.
So if create/delete folder is supported on web UI, it will be very helpful.
Hope to hear your opinion.
Thanks in advance.
It would be great if there was an option like miniserve's:
--index <index_file>
The name of a directory index file to serve, like "index.html"
(base) [root@tx_01 ~]# docker pull sigoden/dufs
Using default tag: latest
latest: Pulling from sigoden/dufs
5d874ac73acd: Pulling fs layer
error pulling image configuration: received unexpected HTTP status: 500 Internal Server Error
分别在阿里和腾讯以及本地服务器都尝试进行镜像下拉,全部报这个错误。
Why limit number of concurrent uploads?
Maybe we should limit the number of concurrent uploads to 3.
使用docker时,默认只有下载功能,docker exec进不去容器, 该怎么增加下载和删除等功能
Hello,
Thanks for this amazing work.
It would be nice to have an option to encrypt files in place providing a key as argument.
That should be probably achievable with something like described here : https://kerkour.com/rust-file-encryption, apart from the tricky part of working out the real file size from the encrypted file size... and to store a generated per file nonce as an encrypted file header, so that the nonce is not the same for each file, but recoverable from the file itself...
Best regards.
Without confirmation, it is easy to delete files accidentally, like by missing Download icon.
To reproduce the issue, create a folder with a file called This & that
. Try to mount the folder via WebDAV. See it fail (possibly with an XML parse error).
Excerpts from the PROPFIND response from duf
and apache2
:
<!-- duf -->
<D:href>/path/to/This & that</D:href>
<D:displayname>This & that</D:displayname>
<!-- apache2 -->
<D:href>/path/to/This%20&%20that</D:href>
Problem
as the title suggests, symbolic links linked to external disks are not listed.
Environment:
0.26.0
brave
on android and librewolf
on linuxArch Linux
请问 什么指令可以查看访问日志? 谢谢
Can I hidden all hidden files?
--hidden .* or other option
If you have any suggestion for complete this feature, you can tell us.
I want to hidden all hidden files, but not I can only hidden them by names.
echo hello > 'abc&def.txt'
dufs
to serve the folder that contains the created file.https://localhost:5000/
in Google Chrome.abc&def.txt
is nowhere to be found. Instead, there is abc&def.txt
. Click the file.abc&def.txt
should appear.abc&def.txt
, the text hello
should appear.Not Found
.Using Nautilus to access the file via WebDAV (dav://localhost:5000/
) works fine.
This flaw is probably caused by text being inserted directly to the constructed HTML page without escape, sanitization, or any form of text processing. This is dangerous as it could lead to some form of code injection attack. I am not just referring to this one bug, I am referring to other potential bugs that are similar to this.
Request:
Hi sigoden,
I'm wondering if there is a time limit for the auth.
Cuz sometimes after several minutes, the auth dialog pops up again. The duration is not quite sure, so that's why I inquire.
And due to the circumstances above, When I upload a large number of files, the latter parts may fail. After the failure shows up, I refresh the page, and the auth dialog pops up, so I guess losing the auth session caused that, maybe.
Please share your opinion on this, Thanks.
It can be very useful to setup a simple server for SPA (Single Page Application)
location / {
root .../dist
index ...index.html
try_files $uri $uri/ /index.html;
}
there are 2 suggests here:
First of all, this is a very cool tool, so thank you for the development efforts. The addition of the --render-index argument is great. This might not be a common use case, but I've got a file server that is probably 50/50 split, where half of the directories contain an index.html and half do not. Currently, when I set that flag, any directory that doesn't have an index.html file just renders a blank page (404 from the server, since the file wasn't found).
Is there any way to make that argument kick in when there is a index.html file present, but fall back to the default rendering of a directory if not? Would be a very nice enhancement.
I believe the option "--allo-delete" should be "--allow-delete".
There are too many files in the directory, would you consider adding a function like "ls | less"
Problem
The Safari browser seems to not show the layout correctly (both macOS and iOS Safari). The spacing between two lines is too big and the "Actions" logo is not aligned either.
Here is Safari:
Here is the normal Chrome:
Environment:
你好,希望可以增加设置title的功能,现在默认的title好像是文件夹的名称
您好,我最近发现这个项目挺高兴的,下载了可执行文件后,就可以在我的电脑上开启 web 服务,将里面的文件分享出来。
然后我平时有一个需求,就是使用开源的阅读器 https://github.com/koreader/koreader 来阅读。这个软件有手机版本,也有 kindle 版本,所以我平时使用频率挺高的。
里面有一个云存储的功能,可以添加 webdav 地址,这样就可以在手机或者 kindle,直接下载 webdav 服务器里面的书籍了。但是我发现在软件里,无法访问 dufs 开启的 webdav 服务。
如果我不设置密码,使用手机访问,电脑终端这边会显示
2022-06-24T13:46:55+08:00 INFO - 192.168.68.211 "PROPFIND //" - 404
如果我添加账号密码,则会显示这样
$dufs --allow-upload -a /@admin:123
Listening on:
http://127.0.0.1:5000/
http://192.168.68.4:5000/
http://[::1]:5000/
2022-06-24T13:58:00+08:00 INFO - ::1 "GET /" - 401
2022-06-24T13:58:06+08:00 INFO - ::1 "GET /" - 200
2022-06-24T13:58:23+08:00 INFO - 192.168.68.211 "PROPFIND //" - 401
2022-06-24T14:00:14+08:00 INFO - 192.168.68.211 "PROPFIND //" - 401
我使用过另外一个 webdav 应用 https://github.com/hacdias/webdav
这个可以在 Koreader 里面访问。
不知道问题出现在哪,期待大佬的解答。
First of all: thanks for this amazing little tool. I just discovered it a few minutes ago, but I already fell in love with it. Small, standalone, feature-rich aaaaand, at last, a file server with an easy upload function! Ticking all the right boxes for me! 👍
Now for the small problem I have...
Problem
I ran dufs
with the following parameters:
$ dufs -A -p 8080 --render-try-index
Unfortunately, the search didn't work: whatever search term I entered, it would always just show the current directory's index. Also, it didn't matter if the search result would be within the current folder or in some directories below it.
Out of curiosity, I tried without --render-try-index
and now the search function does work as expected (even recursively as I had hoped 🤓 ).
It would be great if we could use --render-try-index
together with --allow-search
. Index pages would take precedence and would deny any further processing of URL query parameters, such as ?q=...
. But if no index file is found, the search should just work as if the --render-try-index
option had not been set.
Log
N/A
Environment:
日志时间为世界时间,能不能启用北京时间啊,哪怕给个参数也可以
I use dufs to manage my auto downloads folder, I need to arrange the files from the default download folder when downloaded, so if there is a move action, allow me moving file from one path to another path.
maybe offer a move action, and allow to choose target folder
感觉如果可以设置为默认不显示这个文件,会比较好一些。
例如 http://192.168.1.3/data1 , 显示中会多出来一个data1,
对比发现返回的xml中 <D:href>/data1</D:href> ,
如果返回 <D:href>/data1/</D:href> 则正常显示
Duf does not have an icon, a logo, a favicon in the browser. It would be interesting to add one.
Currently files are downloaded as one zip file without extension.
请问,现有的版本是否已经支持ipv6,发现依旧不能用ipv6访问,谢谢
dufs has almost 20 options, it is necessary to generate completion files.
We will use clap_complete crate to generate completion scripts.
A new option --completions
will be added.
It would seem that running the litmus test suite (https://github.com/tolsen/litmus / http://webdav.org/neon/litmus/) gives only a very partial webdav support (a lot of errors with copy and move, notably non support of directories, etc.).
It seems that the partial support causes problems when for example copying from command line in linux on a mounted (with gnome file manager) dav : the copy is stuck...
It would be nice that the webdav server complies with (at least), the "http basic copymove locks props" tests of the litmus test suite.
Best regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.