Remove personal config file
fix README formating
Add LICENCE
If you know 0x0.st, it's kinda like that.
I tried to selfhost 0x0 several times, but always failed, so I've decided to write my own replacement, which could be easily hosted.
Shors is a file hosting service, where you upload a file and get back a unique URL, where you can retrieve that file. Files can be uploaded through a browser, or anything that can make a POST request. The response will be the URL of your file. Only one file can be uploaded per request. To upload multiple files, tar them up.
Files will be retained for an amount of hours, indirectly proportional to the file size, so larger files will be retained for a shorter period of time.
retention = min_age + (-max_age + min_age) * pow((file_size / max_size - 1), 3)
days
MAX_RETENTION | \
| \
| \
| \
| \
| \
| ..
| \
| ----------..-------------------------------------------
| ..
| \
| ..
| ...
| ..
| ...
| ....
| ......
MIN_RETENTION | ....................
0 MAX_SIZE
MiB
SIGUSR1
to shorskill -SIGUSR1 $(pgrep shors)
cron
To run, simply execute
./shors
A static, precompiled binary can be found in the 1.0 tag.
Everything else is handled by the config file, see Configuration.
Please keep in mind, that the server won't start, if the configured download directory,
by default ./download
, can not be found.
To compile, simply run
cargo build
or, to build a release build
cargo build --release
The config is relatively simply and is commented in the default config.
There is no built in TLS support. To still use TLS, put a reverse proxy in front.
While files, as configurable by the admin, will not be stored forever, there is NO SUCH THING as antivirus checking built in. You will have to do that on you own!
Also, if you use this service, without any access control, anybody with the URL can upload anything to your server, so there is the possibility, that illegal content will be hosted on your server, or that it will be abused for other nefarious purposes, if you do not take appropriate measures.
You have been warned!