Bitnuke is a fully volatile data storage solution currently running at https://bitnuke.io
Please note, this repo is soley the API backend. To bring up the full stack please visit bitnuke-compose.
This repo is strictly the API that supports the following REST calls:
There are 3 ways to run bitnuke:
- From Source: Redis and Nginx are required to be run before the code can be run.
Nginx configs can be found in
deps/conf/
and the static files for the frontend are indeps/data/bitnuke/static/
. Once Nginx and redis are up you can use the following to build and deploy the code.
make dependencies
make run
If you want to compile the code use:
make bitnuke
(dynamically compiled) ormake stat
(statically compiled) ACI/rkt: We have public rkt images hosted on the site! check them out here or go give us a fetch for 64bit machines!rkt fetch unixvoid.com/bitnuke-api:0.20.2
. This image can be run with rkt or you can grab our handy service file atdeps/bitnuke.service
- Docker-compose: If you want to run the full docker stack (complete with ui and
redis) you can build the images and then run from the current directory.
make build-full
make run-full
Bitnuke uses an API for all actions that take place on the site, the following is the specification for the exposed enpoints and their protocols.
/{data}{sec_key}
:GET
: endpoint for fetching data- example:
curl https://bitnuke.io/w80ysllv/3wp89a7vlvr1b0hwe3vdhaidj8aeuvhq
- example:
/{data}
:GET
: endpoint for getting a redirect from link shortener- example:
curl https://bitnuke.io/g3c7
- example:
/upload
:POST
: endpoint for uploading data- parameters:
file
- example:
curl -F file=@testfile.txt https://bitnuke.io/upload
- parameters:
/remove
:POST
: endpoint for removing a file before its natural expiry.- parameters:
file_id
,sec_key
,removal_key
- example:
curl -d file_id=w80ysllv -d sec_key=3wp89a7vlvr1b0hwe3vdhaidj8aeuvhq -d removal_key=aeirkw8o82q1dytlf2gp https://bitnuke.io/remove
- parameters:
/compress
:POST
: endpoint for the link shortener- parameters:
link
- example:
curl -d link=https://google.com https://bitnuke.io/compress
- parameters:
###Shorthand
/upload :: takes a POST of multipart data to be stored. returns a token and security token (as header)
/remove :: takes a POST of url-encoded `token`(token) and `sec`(security token)
/compress :: takes a POST of multipart form (a url) to be stored. returns a token
/{data} :: a token previously generated by '/compress', returns data
/{data}{secure key} :: a token previously generated by '/upload', returns data
Bitnuke does the following when recieving data.
- Generates a
file_id
: the sha3:512 hash of a randomly generated 8 digit alpha numeric string (the key gets stored on disk with this name) - Generates a
sec_key
: a 32 character randomly generated alpha numeric string for encryption - Generates a
removal_key
: a 20 character randomly generated alpha numeric string to be used as a removal auth - Base64 encodes the file contents and then uses AES 256 encryption algorithm to encrypt the contents
- Adds a redis hash key with the
file_id
as the name and contents are the AES 256 encryptedsec_key
andremoval_key
Bitnuke is distributed under the MIT license. See LICENSE in the root of the project for details.
- Shoutout to JenksMedia for the custom background