hfs 0.1.6 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +674 -0
- package/README.md +102 -8
- package/admin/assets/index.dcc78777.css +1 -0
- package/admin/assets/index.f056db34.js +282 -0
- package/admin/assets/sha512.3c0e384c.js +8 -0
- package/admin/index.html +17 -0
- package/admin/logo.svg +36 -0
- package/frontend/assets/index.55c710c2.js +85 -0
- package/frontend/assets/index.ee805a6c.css +1 -0
- package/frontend/assets/sha512.634b743e.js +8 -0
- package/frontend/fontello.css +77 -0
- package/frontend/fontello.woff2 +0 -0
- package/frontend/index.html +18 -0
- package/package.json +93 -28
- package/plugins/antibrute/plugin.js +38 -0
- package/plugins/download-counter/plugin.js +47 -0
- package/plugins/download-counter/public/hits.js +5 -0
- package/plugins/updater-disabled/plugin.js +44 -0
- package/plugins/vhosting/plugin.js +42 -0
- package/src/QuickZipStream.js +285 -0
- package/src/ThrottledStream.js +93 -0
- package/src/adminApis.js +169 -0
- package/src/api.accounts.js +59 -0
- package/src/api.auth.js +130 -0
- package/src/api.file_list.js +103 -0
- package/src/api.helpers.js +32 -0
- package/src/api.monitor.js +102 -0
- package/src/api.plugins.js +125 -0
- package/src/api.vfs.js +164 -0
- package/src/apiMiddleware.js +136 -0
- package/src/block.js +33 -0
- package/src/commands.js +105 -0
- package/src/config.js +172 -0
- package/src/connections.js +57 -0
- package/src/const.js +83 -0
- package/src/crypt.js +21 -0
- package/src/debounceAsync.js +48 -0
- package/src/events.js +9 -0
- package/src/frontEndApis.js +38 -0
- package/src/github.js +102 -0
- package/src/index.js +53 -0
- package/src/listen.js +226 -0
- package/src/log.js +137 -0
- package/src/middlewares.js +154 -0
- package/src/misc.js +160 -0
- package/src/pbkdf2.js +74 -0
- package/src/perm.js +176 -0
- package/src/plugins.js +338 -0
- package/src/serveFile.js +104 -0
- package/src/serveGuiFiles.js +113 -0
- package/src/sse.js +29 -0
- package/src/throttler.js +91 -0
- package/src/update.js +69 -0
- package/src/util-files.js +141 -0
- package/src/util-generators.js +30 -0
- package/src/util-http.js +30 -0
- package/src/vfs.js +227 -0
- package/src/watchLoad.js +73 -0
- package/src/zip.js +69 -0
- package/.npmignore +0 -19
- package/admin-server.js +0 -212
- package/cli.js +0 -33
- package/file-server.js +0 -100
- package/lib/common.js +0 -10
- package/lib/extending.js +0 -158
- package/lib/mime.js +0 -19
- package/lib/misc.js +0 -75
- package/lib/serving.js +0 -81
- package/lib/vfs.js +0 -403
- package/main.js +0 -24
- package/note.txt +0 -104
- package/speedtest.js +0 -21
- package/static/backend.css +0 -14
- package/static/backend.html +0 -32
- package/static/backend.js +0 -694
- package/static/extending.js +0 -187
- package/static/frontend.css +0 -29
- package/static/frontend.html +0 -23
- package/static/frontend.js +0 -230
- package/static/icons/files/archive.png +0 -0
- package/static/icons/files/audio.png +0 -0
- package/static/icons/files/file.png +0 -0
- package/static/icons/files/folder.png +0 -0
- package/static/icons/files/image.png +0 -0
- package/static/icons/files/link.png +0 -0
- package/static/icons/files/video.png +0 -0
- package/static/jquery.js +0 -4
- package/static/jquery.rule-1.0.2.js +0 -273
- package/static/misc.js +0 -194
- package/static/tpl.js +0 -17
- package/todo.txt +0 -25
package/README.md
CHANGED
|
@@ -1,11 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
===
|
|
1
|
+
# HFS: HTTP File Server
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+

|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
## Introduction
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
HFS is the best way via web to access or share files from your disk.
|
|
8
|
+
|
|
9
|
+
- It's a server software, share files **fresh from your disk**. Don't rely on services, be independent!
|
|
10
|
+
- It's all very **fast**. Try download zipping 100GB, it starts immediately!
|
|
11
|
+
- **Easy to use**. HFS tries to detect problems and suggest solutions.
|
|
12
|
+
- Share **even a single file** with our *virtual file system*, even with a different name, all without touching the real file. Present things the way you want!
|
|
13
|
+
- **Watch** all activities in real-time.
|
|
14
|
+
- **Control bandwidth**, decide how much to give.
|
|
15
|
+
|
|
16
|
+
This project is in an early stage, few things are missing, but it already rocks!
|
|
17
|
+
|
|
18
|
+
This is a full rewrite of [the Delphi version](https://github.com/rejetto/hfs2).
|
|
19
|
+
You won't find all previous features here (yet), but still we got:
|
|
20
|
+
|
|
21
|
+
## How does it work
|
|
22
|
+
|
|
23
|
+
- run HFS on your computer, configuration page automatically shows up
|
|
24
|
+
- select what files and folders you want to be accessible
|
|
25
|
+
- possibly create accounts and limit access to files
|
|
26
|
+
- access those files from a phone or another computer just using a browser
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- https
|
|
31
|
+
- unicode
|
|
32
|
+
- virtual file system
|
|
33
|
+
- mobile friendly front-end
|
|
34
|
+
- search
|
|
35
|
+
- accounts
|
|
36
|
+
- resumable downloads
|
|
37
|
+
- download folders as zip archive
|
|
38
|
+
- simple website serving
|
|
39
|
+
- plug-ins
|
|
40
|
+
- log file
|
|
41
|
+
- speed throttler
|
|
42
|
+
- admin web interface
|
|
43
|
+
- virtual hosting (plug-in)
|
|
44
|
+
- anti-brute-force (plug-in)
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
1. go to https://github.com/rejetto/hfs/releases
|
|
49
|
+
2. click on `Assets`
|
|
50
|
+
3. **download** the right version for your computer
|
|
51
|
+
4. launch `hfs` file
|
|
52
|
+
5. the browser should automatically open on `localhost` address, so you can configure the rest in the Admin panel.
|
|
53
|
+
- if a browser cannot be opened on the computer where you are installing HFS,
|
|
54
|
+
you should enter this command in HFS console: `create-admin <PASSWORD>`
|
|
55
|
+
|
|
56
|
+
If you access *Admin panel* via localhost, by default HFS **won't** require your to login.
|
|
57
|
+
If you don't like this behavior, disable it in the Admin panel or enter this console command `config localhost_admin false`.
|
|
58
|
+
|
|
59
|
+
### Other systems
|
|
60
|
+
|
|
61
|
+
If your system is not Windows/Linux/Mac, you can try this alternative version:
|
|
62
|
+
|
|
63
|
+
0. [install node.js](https://nodejs.org)
|
|
64
|
+
1. execute: `sudo npm -g i hfs`
|
|
65
|
+
2. launch: `hfs`
|
|
66
|
+
|
|
67
|
+
Configuration and other files will be stored in `USER_HOME_FOLDER/.vfs`
|
|
68
|
+
|
|
69
|
+
With this installation method, you can update with `sudo npm -g update hfs` .
|
|
70
|
+
|
|
71
|
+
## Plug-ins
|
|
72
|
+
|
|
73
|
+
To install a plugin you just copy its folder inside `plugins` folder.
|
|
74
|
+
|
|
75
|
+
Delete it to uninstall.
|
|
76
|
+
|
|
77
|
+
HFS will ignore all folders with `-disabled` at the end of the name.
|
|
78
|
+
|
|
79
|
+
## Why you should upgrade from HFS 2.x to 3
|
|
80
|
+
|
|
81
|
+
As you can see from the list of features, we already have some goods that you cannot find in HFS 2.
|
|
82
|
+
Other than that, you can also consider:
|
|
83
|
+
|
|
84
|
+
- it's more robust: it was designed to be an always-running server, while HFS 1-2 was designed for occasional usage (transfer and quit)
|
|
85
|
+
- passwords are never really stored, just a non-reversible hash is
|
|
86
|
+
- more flexible permissions
|
|
87
|
+
|
|
88
|
+
But you may still want to stay with HFS 2.x (so far) for the following reasons
|
|
89
|
+
|
|
90
|
+
- smaller
|
|
91
|
+
- more tested
|
|
92
|
+
- classic window interface (can be easier for some people)
|
|
93
|
+
|
|
94
|
+
## Console commands
|
|
95
|
+
|
|
96
|
+
If you have access to HFS' console, you can enter commands. Start with `help` to have a full list.
|
|
97
|
+
|
|
98
|
+
## Passing parameters
|
|
99
|
+
|
|
100
|
+
Any value you see in the config file with name *X* can be passed at command line in the form `--X <new_value>`,
|
|
101
|
+
or you can enter console command `config X <new_value>`.
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
[GPLv3](https://github.com/rejetto/hfs/blob/master/LICENSE.txt)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100vh}#root{min-height:100%;display:flex}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.MuiTreeItem-content{box-sizing:border-box}ol,ul{margin-top:.2em}.dialog-backdrop{position:fixed;inset:0;background:#888a;display:flex;justify-content:center;align-items:center;z-index:1000}.dialog{background:#fff;background:var(--bg);padding:max(.5em,1vw);border-radius:1em;position:relative;margin:0 3vw;overflow:hidden;max-height:calc(100vh - 2em)}.dialog-icon{color:#fff;background-color:var(--color);position:absolute;top:0;width:1.8em;height:1.7em;text-align:center;border-radius:.8em 0}.dialog-closer{border-radius:0 .8em;right:0;padding:0;background-color:#c99}.dialog-icon~.dialog-content{margin-top:1.3em}.dialog-type{left:0;top:0;overflow:hidden;line-height:1.7em}.dialog-content{overflow:auto;max-height:calc(100vh - 4em)}.dialog-content p{white-space:pre-wrap;margin:.5em 0}.dialog-confirm .dialog-content button{margin-top:1em}.dialog-alert-info{--color: #282 }.dialog-alert-warning{--color: #c91 }.dialog-alert-error{--color: #822}@media (max-width: 50em){.dialog-closer{font-size:120%}.dialog-icon~.dialog-content{margin-top:2em}}
|