rejetto / hfs Goto Github PK
View Code? Open in Web Editor NEWHFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
License: GNU General Public License v3.0
HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
License: GNU General Public License v3.0
Describe the bug
After reboot my CLIENT pc i get 404 on white window in root =\ To reproduce this bug - clear temp dir on windows os
An excellent feature that is sorely lacking along with the ability to upload files: this is the ability to view directories in the form of tiles and photo previews, as well as open images in some viewer with the ability to slideshow (the same greybox). It's quite easy to screw it on and it seems to me that it will raise the level of the software quite well.
Sometimes HFS just ...stops working.
error.zip
error-2.zip
When I create an account, I have to restart the server to be able to log in. If the server is NOT restarted, then it is not possible to log into the account.
Well, just a question... is localization support planned in the future?
currently I'm facing network failure in busy hour, it is easily disconnecting from HFS server. and "zip" file has no resume download feature after connection lost , it's a torture when lost connection on downloading huge size files and can not continue from where the files was downloaded😭.
thank you!
It would be cool to be able to modify html/css/js files, which would make it possible to change the appearance of the web interface.
It would be cool to be able to select some of them with checkmarks in the list of files and by clicking the "Download archive" button, download not the entire directory, but only the previously selected files. As for me - it will be very convenient.
FINALLY found it. I don't even know how to tell it until now.
Look here,
Changing to this can solve:
pluginsConfig.set(v => ({ ...v, [id]: _.isEmpty(config) ? undefined : Object.assign(v[id], config) }))
And a test plugin to test it: test.zip
foo: "apple"
and bar: "orange"
setConfig
bar
to banana
, then show the two fruit name on screenapple
to potato
, save it. In terminal you can see the change being appliedapple
. In terminal you can see foo
is changed back to apple
, reflected by subscribeConfig
I have some small questions, and I want to know more about the details:
1st
In current repo state code I see Plugin description string should have double quotes.
I also see in code it's for getting description from disabled plugins, without executing them.
I also guess it's for not escaping single quotes. But in this case escaping double quotes won't work, instead...
In my mind a better alternative is backtick `'any' "string"
`. Multiline flag maybe also used in that regexp.
Of course tell plugin developers don't use ${}
btw single quote is my code style :)
2nd
Readme say Plugin middleware function could return another function for "executing in upstream".
I found it's just executing the returned function at the very end of plugin cycle.
Think of there can be multiple middlewares, that do different things. We also need correct order.
Is the "upstream" used to do that? I feel not enough...
3rd
What's the supposed way to let a plugin handle authentication? (or should not do it?)
I can't directly get it. Since it's about security, please take consideration :)
4th
Every time I want to sync HFS repo, I pull
it but always resulting in file conflict. Notably the 1.4MiB package-lock.json
(I didn't change any dev file manually)
Suggested by git, I just committed a change. But it result in many other dev files can't be merged.
That's even more messy, and what I could do is rm -rf hfs
then git clone
it again.
This time, in fresh repo I put a *
in .gitignore
. I don't know if it would work...
Any suggestion?
The last
Consider a user guide? Put "Quick Start" in readme, and detailed "Cookbook" and "Dev Guide" in elsewhere.
I can help it if I have time :)
Many one say HFS 3 is not user friendly. Though I get no point about this...
Well, that's all...
Oh wait, is such kind of things suitable in Discussion?
Describe the bug
Greetings! If you send a direct link to a file to a person and he did not log in before, then instead of authorization -> file download, Not Found tells him and that's it. This is very inconvenient, especially if you don't need to show the file storage interface once again.
Not a big deal for me, just update the docs, for other people :)
hi,Thanks for your work,
It's a great tool, and version 3 is a good one, but there are some things that would like to keep some of the settings of version 2. For example: the sorting of files can be the same as in version 2, and for hidden files in folders, you can choose whether to load them in.
Describe the bug
The plugins aren't loading in the Admin interface after updating to v0.26.1
To Reproduce
Steps to reproduce the behavior:
hfs.exe
executable.Expected behavior
A list of active/enabled plugins in the Admin interface.
Environment (please complete the following information):
Installed on:
Accessed on:
I have ran the application on my server in ubuntu 22.04 version.
I use nohup to make the program run in the background.
However, I don't know why, after the program runs for a while, it will automatically crash and will not restart. After I checked the log output, I found some key lines.
nohup: ignoring input
HFS ~ HTTP File Server - Copyright 2021-2022, Massimo Melina [email protected]
License https://www.gnu.org/licenses/gpl-3.0.txt
started 9/6/2022, 4:57:46 PM
version 0.26.2
build 2022-09-03T21:16:11.000Z
cwd /root/.hfs
config config.yaml
HINT: type "help" for help
using generic lib for crc32
[Error: EBADF: bad file descriptor, read] {
errno: -9,
code: 'EBADF',
syscall: 'read'
}
Describe the bug
I have a bug for files with names in a non-standard encoding if such a directory is downloaded through an archive. In this case, in the example, the OS encoding is Russian, after unpacking the archive it turns into a mess.
Screenshots
https://share.dvor-net.ptz.ru/Z4ZEnuNj2J.png
Environment (please complete the following information):
I've encountered several tough bugs while making some other plugin config.
Let me say one here... (and the rest after me successfully debug them, in separate issues.)
At here, HFS checks if the config being set is the same as default, if yes then don't set -- so, the config remains unchanged :(
(i.e. you can't have default value anymore, once you set it to something else)
P.S. it's 2 hours debugging on this. Hope I have better luck
Thanks for this extremely powerful tool. is amazing.
Uploads are the only thing missing and that is it!
In 0.14.3, particularly after commit da616fe found with git bisect
,
in function ctxAdminAccess
of adminApis.ts
,
in some conditions ctx.ip
of localhost addresses is ::ffff:127.0.0.1
rather than expected 127.0.0.1
or ::1
.
An obvious symptom is Firefox can't access the admin interface when starting "cleanly" (i.e. first run) -- it requires auth immediately because it's not being considered localhost (though at this point there's no account, making accounts.yaml manually is needed)
curl
and wget
is partially affected too, but it doesn't affect Chromium, in which ctx.ip
is just 127.0.0.1
All these is tested on my Linux and Android (Termux). On web search there are some relative cases (of other stuffs) on Windows
So at this time just add ::ffff:127.0.0.1
to function isLocalHost
nearby 😃
See around here of GNU GPL FaQ.
From the view of license, a plugin must be (also) released under GPL 3, otherwise it's a violate.
My thought is, it's necessary to check the license of a plugin, from search result of GitHub.
(Maybe when installing, to avoid low performance of course)
(And maybe analyze from file COPYING
)
Another matter is "exception" system of GPL 3, could be used to deal with necessary circumstances.
For example to allow plugins with non-copyleft license -- but whatever, they should be free-as-in-freedom!
Describe the bug
I've also tried selecting all in filter list before clicking "download zip" to no avail.
It downloads everything correctly if I only have virtual folders. But if I add a folder from disk anywhere (root/home level or inside a virtual folder) then it again downloads a single file only.
Environment:
Describe the bug
Set to ROOT folder permissions to "Any account (login required)" not working: root dir always shown to guests =\
To Reproduce
Steps to reproduce the behavior:
Hello! Thx for your work! But server need some feature for uploading files =\
The file_list
/sendList
gives back a Readable
.
It can contain error information, but in order to know it before serving, I need to read it -- I could get an entry or an error, but in case an entry I can't put it back.
My thoughts:
ret
and return list
(rather than returning list.return
)Any change is acceptable, my case is in active development too :)
Hi,
I would like to have a assistant with code"Failed API loginSrp1", it appear in login with non-admin privilege accounts. Thanks.
Very simple, a user who doesn't have permission to download should also NOT view the contents of the folder in question. He actually gets a 401 error trying to access the folder. However, using the "deep Search" function it is able to find files and folders that were supposed to remain hidden.
This may be intentional (since it refers to a simple "disable downloading for the contents of this folder" instead of an actual "hide this folder and its contents and prevent viewing/downloading").
Anyway, thanks again 👍
Environment (please complete the following information):
When forcing the pull (as usual) from version 0.21.0 cf525a7 to version 0.22.0 10ee26d, it fails on package-lock.json
.
By "restoring" that file it solved.
git restore package-lock.json
I guess it's because change at 91a45a0? (And my local modification, didn't add/commit, all automatically by node)
Consider a tip for people in the docs?
url with %2f parameter is not recognized
When forcing the pull (as usual) from version 0.21.0 cf525a7 to version 0.22.0 10ee26d, it fails on package-lock.json
.
By "restoring" that file it solved.
git restore package-lock.json
I guess it's because change at 91a45a0? (And my local modification, didn't add/commit, all automatically by node)
Consider a tip for people in the docs?
A command to open the admin interface in the browser from the command line would be useful.
i can`t find some where to upload file in hfs ,please help ~ thank you !
A downloader software call "Internet Download Manager", or short for "IDM", have ability to login in some kind of server that do not need to run in browser. But this feature didn't work in HFS after session expired. the error code is http "401" unauthorized with HFS user name and password. Hope can have a solution to deal with that. Thank you so much!
Played with file-listing APIs and found api.file_list
is the best to use.
The simplest approach to my request is to provide another identical function without asyncGeneratorToReadable
wrapped to generator.
And my thought: this API is used by frontend ajax request, thus it's also stable enough to be imported with api.require
.
... right?
Details:
For myself I started coding on HFS 2 template plugin again. This time it's going flawlessly!
(Status: Approx. 60% of "engine" is completed. Still not functional at all, yet...)
And that's the reason of these requirements.
Drawbacks of file_list
:
sse
, it returns an Readable
or a plain object, with file entries.
Readable
is streamed, but I know it's for HTTP replying, and it's not that suitable for code, particularly plugins.I also remember you've mentioned walkNode
. But it's too basic, and lacks error-reporting/masking etc that are already in file_list
.
I want to download the files on HFS on my mobile phone, but I have to manually enter the URL every time, which is very troublesome. If I can generate a QR code on HFS, I can directly access my resources by scanning the code on my mobile phone.
Describe the bug
When downloading a large folder (14GB) using the Download Zip
button, the download seems to complete sucessfully, but right when it looks like its about to finish it restarts the download. This happens from multiple PCs in multiple locales. The download would continue to do this forever if you do not cancel it.
To Reproduce
Steps to reproduce the behavior:
Download zip
to getExpected behavior
I would expect the download to complete and not restart.
Environment (please complete the following information):
I want that:
I think some security should be concerned, too. For 3rd-party plugins, it is possible to ruin an environment by allowing something like real file/dir path.
I don't know if it's intended, but a middleware can also do large traffic.
To solve just swap this in index.ts
.use(pluginsMiddleware())
.use(throttler)
... or make it optional?
Very similar as #48 :)
to solve swap these in index.ts
:
.use(pluginsMiddleware())
.use(gzipper)
And I didn't find problem with it :)
Hi, thanks a lot for your project. I'm really a beginner and I met this when I first start the program as the README said.
It didn't open the browser as it should. I've tried with config.yaml and got the same reaction. Could you tell me how to fix it?
In the debug.log, it said:
2022-05-20T16:40:55.671Z: http Error: listen EACCES: permission denied 0.0.0.0:80
Environment: [Win][0.22.0]
Hi, I'm a hfs user for a vary long time, mainly I used the Delphi version.
Today, I first tried the Node.js version, works correctly.
One missing feature is that can a user upload a file to the server?
I can't find the option here.
Thanks.
It would be nice to be able to download the zipped directory via a direct link: this makes it possible to download files with multi-threaded managers like Download Manager
Is your feature request related to a problem? Please describe.
It would be cool to be able to set a task to download files via a direct link from the network. A kind of download manager. Let me explain why: all DMs on the network either do not have a web interface, or it is very inconvenient.
Describe the solution you'd like
In fact, for a starting point, a pop-up window is enough with entering a link from where to download and selecting a directory within HFS where to download + download in several streams. If the feature takes off, it could turn out to be a great part of a stall of a great program.
One is (yet) Google font. Another is forge.min.js
from unpkg.com
... :)
在本地用着挺不错的,然后到服务器上启动的时候就报错了。
network veth8b41470
- http://[fe80::a8f8:77ff:fe1b:ca1f]:8011
Error: spawn xdg-open ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
spawnargs: [ 'http://localhost:8011/~/admin/' ]
}
loading plugin antibrute
Hello R,
i meant if uploads where still not available in THIS version. accidentally posted on the other branch
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.