hfs 0.26.9 → 0.29.0
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/README.md +17 -3
- package/admin/assets/index-cbb42a0e.js +415 -0
- package/admin/assets/index-f8049da8.css +1 -0
- package/{frontend/assets/sha512.6af42937.js → admin/assets/sha512-3273321f.js} +2 -2
- package/admin/index.html +2 -2
- package/frontend/assets/index-72e96bb2.js +85 -0
- package/frontend/assets/index-cbcc6ac5.css +1 -0
- package/{admin/assets/sha512.9dfe82e1.js → frontend/assets/sha512-2c2fa926.js} +2 -2
- package/frontend/index.html +3 -3
- package/package.json +8 -10
- package/plugins/vhosting/plugin.js +23 -20
- package/src/QuickZipStream.js +2 -25
- package/src/ThrottledStream.js +1 -1
- package/src/adminApis.js +6 -8
- package/src/api.accounts.js +10 -10
- package/src/api.auth.js +21 -17
- package/src/api.file_list.js +13 -6
- package/src/api.helpers.js +6 -6
- package/src/api.monitor.js +2 -0
- package/src/api.plugins.js +1 -0
- package/src/api.vfs.js +17 -19
- package/src/apiMiddleware.js +16 -9
- package/src/block.js +1 -0
- package/src/commands.js +1 -0
- package/src/config.js +3 -2
- package/src/connections.js +1 -1
- package/src/const.js +19 -7
- package/src/crypt.js +1 -1
- package/src/debounceAsync.js +1 -0
- package/src/events.js +1 -1
- package/src/frontEndApis.js +23 -2
- package/src/github.js +5 -1
- package/src/index.js +5 -3
- package/src/listen.js +6 -3
- package/src/log.js +6 -6
- package/src/middlewares.js +32 -26
- package/src/misc.js +27 -2
- package/src/perm.js +31 -29
- package/src/plugins.js +6 -8
- package/src/serveFile.js +15 -13
- package/src/serveGuiFiles.js +5 -28
- package/src/sse.js +3 -2
- package/src/throttler.js +1 -1
- package/src/update.js +3 -2
- package/src/upload.js +92 -0
- package/src/util-files.js +19 -13
- package/src/util-generators.js +1 -0
- package/src/util-http.js +3 -1
- package/src/util-os.js +41 -0
- package/src/vfs.js +44 -37
- package/src/watchLoad.js +1 -1
- package/src/zip.js +9 -6
- package/admin/assets/index.bb5198ec.js +0 -281
- package/admin/assets/index.dcc78777.css +0 -1
- package/frontend/assets/index.27a78796.js +0 -85
- package/frontend/assets/index.93366732.css +0 -1
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ You won't find all previous features here (yet), but still we got:
|
|
|
34
34
|
- search
|
|
35
35
|
- accounts
|
|
36
36
|
- resumable downloads
|
|
37
|
+
- resumable uploads
|
|
37
38
|
- download folders as zip archive
|
|
38
39
|
- simple website serving
|
|
39
40
|
- plug-ins
|
|
@@ -64,10 +65,21 @@ If your system is not Windows/Linux/Mac, you can try this alternative version:
|
|
|
64
65
|
1. execute: `sudo npm -g i hfs`
|
|
65
66
|
2. launch: `hfs`
|
|
66
67
|
|
|
67
|
-
Configuration and other files will be stored in
|
|
68
|
+
Configuration and other files will be stored in `%HOME%/.vfs`
|
|
68
69
|
|
|
69
70
|
With this installation method, you can update with `sudo npm -g update hfs` .
|
|
70
71
|
|
|
72
|
+
### Service
|
|
73
|
+
|
|
74
|
+
If you want to run HFS as a service
|
|
75
|
+
- if you installed with `npm` on Windows
|
|
76
|
+
- service installation
|
|
77
|
+
- run `npx qckwinsvc2 install name="HFS" description="HFS" path="%APPDATA%\npm\node_modules\hfs\src\index.js" args="--cwd %HOMEPATH%\.hfs" now`
|
|
78
|
+
- service update
|
|
79
|
+
- run `npx qckwinsvc2 uninstall name="HFS"`
|
|
80
|
+
- run `npm -g update hfs`
|
|
81
|
+
- run the service installation again
|
|
82
|
+
|
|
71
83
|
## Plug-ins
|
|
72
84
|
|
|
73
85
|
To install a plugin you just copy its folder inside `plugins` folder.
|
|
@@ -133,7 +145,7 @@ an *env* called `HFS_CONFIG`. Any relative path provided is relative to the *cwd
|
|
|
133
145
|
- `https_port` listen on a specific port. Default is 443.
|
|
134
146
|
- `cert` use this file for https certificate. Minimum to start https is to give a cert and a private_key. Default is none.
|
|
135
147
|
- `private_key` use this file for https private key. Default is none.
|
|
136
|
-
- `allowed_referer` you can decide what domains can link to your files. Wildcards supported. Default is any.
|
|
148
|
+
- `allowed_referer` you can decide what domains can link to your files. Wildcards supported. Default is empty, meaning any.
|
|
137
149
|
- `block` a list of rules that will block connections. E.g.:
|
|
138
150
|
```
|
|
139
151
|
block:
|
|
@@ -145,6 +157,7 @@ an *env* called `HFS_CONFIG`. Any relative path provided is relative to the *cwd
|
|
|
145
157
|
- `custom_header` provide HTML code to be put at the top of your Frontend. Default is none.
|
|
146
158
|
- `localhost_admin` should Admin be accessed without credentials when on localhost. Default is true.
|
|
147
159
|
- `proxies` number of proxies between server and clients to be trusted about providing clients' IP addresses. Default is 0.
|
|
160
|
+
- `keep_unfinished_uploads` should unfinished uploads be deleted immediately when interrupted. Default is true.
|
|
148
161
|
|
|
149
162
|
#### Virtual File System (VFS)
|
|
150
163
|
|
|
@@ -166,6 +179,7 @@ Valid keys in a node are:
|
|
|
166
179
|
- `"*"`: any account can, i.e. anyone who logged in.
|
|
167
180
|
- `[ frank, peter ]`: the list of accounts who can.
|
|
168
181
|
- `can_see`: specify who can see this entry. Even if a user can download you can still make the file not appear in the list.
|
|
182
|
+
- `can_upload` specify who can upload. Applies to folders with a source. Default is none.
|
|
169
183
|
Remember that to see in the list you must also be able to download, or else you won't see it anyway. Value is a `WhoCan` descriptor, refer above.
|
|
170
184
|
- `masks`: maps a file mask to a set of properties as the one documented in this section. E.g.
|
|
171
185
|
```
|
|
@@ -202,7 +216,7 @@ For each account entries, this is the list of properties you can have:
|
|
|
202
216
|
|
|
203
217
|
- `ignore_limits` to ignore speed limits. Default is `false`.
|
|
204
218
|
- `redirect` provide a URL if you want the user to be redirected upon login. Default is none.
|
|
205
|
-
- `admin` set `true` if you want to let this account log in to the Admin
|
|
219
|
+
- `admin` set `true` if you want to let this account log in to the Admin-panel. Default is `false`.
|
|
206
220
|
- `belongs` an array of usernames of other accounts from which to inherit their permissions. Default is none.
|
|
207
221
|
|
|
208
222
|
## License
|