some documentation
Massimo Melina committed
Dec 19, 2021 at 01:06 UTC
34fd9d91d61ce60f100bb8a33bfcc2cbd6d40bbd
3 files changed
+52
-2
dev-notes.md
+1
@@ -23,6 +23,7 @@
23
- resumable?
24
- vfs: ability to remove/hide/rename files deep in a source
25
- let user change password
26
+- user should be able to inherit from another a group (another user)
27
- login without passing clear text password?
28
we could use asymmetric encryption, possibly on a hashed password, that means
29
we should store a hash2(hash1(password+salt1)), where hash1 is applied on both client
frontend/README.md
+50
-1
@@ -1,3 +1,52 @@
1
+# HFS: HTTP File Server
2
+
3
+This project is currently at a very early stage, only basic features are available.
4
+
5
+HFS is a file server offering a virtual file system (vfs).
6
+You can easily share a single file instead of the whole folder,
7
+or you can rename it, but without touching the real file, just virtually.
8
+
9
+# Configuration
10
+
11
+At the moment there's no administration UI. You must edit configuration files.
12
+
13
+## Virtual File System (VFS)
14
+
15
+The virtual file system is a tree of nodes.
16
+By default, it's in the file `vfs.yaml`.
17
+You can decide a different file by passing it as first parameter at command line.
18
+A node is folder, unless you provide for it a source that's not a folder itself.
19
+Valid keys in a node are:
20
+- `name`: how to display it. If not provided HFS will infer it from the source.
21
+- `source`: where to get its content from. Absolute or relative file path, or even http url.
22
+- `children`: just for folders, specify its virtual children.
23
+ Value is a list and its entries are nodes.
24
+- `hidden`: this must not be listed, but it's still downloadable.
25
+- `hide`: similar to hidden, but it's from the parent node point of view.
26
+ Use this to hide entries that are read from the source, not listed in the VFS.
27
+ Value can be just a file name, a mask, or a list of names/masks.
28
+- `rename`: similar to name, but it's from the parent node point.
29
+ Use this to change the name of entries that are read from the source, not listed in the VFS.
30
+ Value is a dictionary, where the key is the original name.
31
+- `perm`: specify who can see this.
32
+ Use this to limit access to this node.
33
+ Value is a dictionary, where the key is the username, and the value is `r`.
34
+
35
+# Accounts
36
+
37
+Accounts are kept in `accounts.yaml` if any, or you can decide another file by passing parameter `--accounts`.
38
+Inside the file, all accounts should go under `accounts:` key, as a dictionary where the key is the username.
39
+E.g.
40
+```
41
+accounts:
42
+ admin:
43
+ password: hello123
44
+ guest:
45
+ password: guest
46
+```
47
+
48
+As soon as possible HFS will encrypt passwords in a non-reversible way.
49
+
50
# Building instructions
51
52
1. Launch `npm run build` in the root
@@ -5,4 +54,4 @@
54
55
You'll find the output in `dist` folder.
56
8
-Now you can run `node dist`, or `cd dist` and `node .`
\ No newline at end of file
57
+Now you can run `node dist`, or `cd dist` and `node .`
package.json
+1
-1
@@ -8,7 +8,7 @@
8
],
9
"homepage": "https://rejetto.com/hfs",
10
"license": "GPL-3.0",
11
- "author": "Massimo Melina <a@rejetto.com> (https://rejetto.com)",
11
+ "author": "Massimo Melina <a@rejetto.com>",
12
"scripts": {
13
"watch-server": "nodemon --ignore tests/ --watch src -e ts,tsx --exec ts-node src/index.ts vfs.yaml",
14
"start": "node dist",