2017-11-09 11:52:05 +00:00
|
|
|
|
2018-10-26 13:27:54 +00:00
|
|
|
Setup
|
|
|
|
===
|
2017-11-09 11:52:05 +00:00
|
|
|
|
2018-10-26 13:27:54 +00:00
|
|
|
* Nginx
|
|
|
|
* php-fpm
|
|
|
|
* php-redis
|
|
|
|
* php-curl
|
2018-11-19 17:22:14 +00:00
|
|
|
* php-gmp
|
2018-10-26 13:27:54 +00:00
|
|
|
* Redis
|
|
|
|
|
|
|
|
Nginx handler
|
|
|
|
====
|
2017-11-09 11:52:05 +00:00
|
|
|
```
|
2018-11-19 17:22:14 +00:00
|
|
|
location ~* "^\/([0-9a-z]{27})$" {
|
|
|
|
try_files $uri /src/php/handler.php?h=download&id=$1;
|
2017-11-09 07:56:02 +00:00
|
|
|
}
|
2018-07-08 08:55:57 +00:00
|
|
|
```
|
|
|
|
|
2019-03-25 09:39:09 +00:00
|
|
|
Void Binary File Format (VBF2)
|
2018-10-26 13:27:54 +00:00
|
|
|
===
|
2019-03-25 09:39:09 +00:00
|
|
|
*All numbers are little endian*
|
2019-03-25 09:44:17 +00:00
|
|
|
|
2019-03-25 09:39:09 +00:00
|
|
|
| Name | Size | Description |
|
2018-10-26 13:27:54 +00:00
|
|
|
|---|---|---|
|
2019-03-25 09:39:09 +00:00
|
|
|
| version | 1 byte unsigned number | Binary file format version |
|
2019-03-28 17:53:06 +00:00
|
|
|
| magic | 7 bytes | "OID🐱" encoded to UTF8 string |
|
2019-03-25 09:39:09 +00:00
|
|
|
| uploaded | 4 byte unsigned number | Unix timestamp of when the upload started |
|
|
|
|
| payload | EOF - 32 bytes | The encrypted payload |
|
|
|
|
| hash | 32 bytes HMAC-SHA265 | The HMAC of the unencrypted file* |
|
2018-07-30 07:37:18 +00:00
|
|
|
|
2019-03-25 09:39:09 +00:00
|
|
|
*\* Using the encryption key as the HMAC key*
|
2018-10-26 13:27:54 +00:00
|
|
|
|
2019-03-25 09:39:09 +00:00
|
|
|
VBF Payload Format
|
|
|
|
====
|
|
|
|
| Name | Size | Description |
|
2018-10-26 13:27:54 +00:00
|
|
|
|---|---|---|
|
2019-03-25 09:39:09 +00:00
|
|
|
| header_length | 2 byte unsigned number | Length of the header section |
|
|
|
|
| header | {header_length} UTF8 String | The header json |
|
2018-10-26 13:27:54 +00:00
|
|
|
| file | >EOF | The file |
|