all repos — fsrv @ 96aeb8fa8fc95959f40f1a841e88b04e057ef211

filehost server for x.icyphox.sh

readme (view raw)

 1FSRV
 2
 3Filehost server for https://x.icyphox.sh.
 4
 5
 6(NON) FEATURES
 7
 8· Single-user
 9· Only handles file upload. Serving is left to the reverse proxy.
10· Bring your own index.html (-index flag)
11· Requires a key to upload. Change the default!
12· Filetype hooks. (See HOOKS)
13
14
15USAGE
16
17    Usage of ./fsrv:
18      -index string
19            path to index html file (default "index.html")
20      -key string
21            secret key; generate this yourself (default "secret")
22      -namelen int
23            length of random filename (default 5)
24      -port string
25            port to listen on (default "9393")
26      -storepath string
27            path to store uploaded files (default "uploads")
28      -url string
29            url for fsrv to serve files (default "localhost")
30
31Sample index.html is provided. Edit as required.
32
33
34HOOKS
35
36Hooks can be defined in the 'hooks/' directory for specific filetypes.
37These can be written in any language, provided the file is executable,
38and accepts one argument: the file to execute against.
39
40For example: the hooks/7z.sh file will run against all 7z files, and will
41recieve the filename as an argument ($1). The filetype is determined by
42parsing magic bytes, and not by file extension.