MCPcopy Index your code
hub / github.com/Hattorius/CipherDrop

github.com/Hattorius/CipherDrop @v0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1 ↗ · + Follow
43 symbols 72 edges 13 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cipher Drop

Goal: Create an anonymous file hosting service.

Available at - https://cipherdrop.sh - http://7li2aq2wefmr7ypllk36qyf2ueagvywurhvvmpafadmkgidmgyftetqd.onion

Features

  • Encrypt file on client
  • Private key & nonce never leave client machine
  • Bytes also get encrypted on the server
  • Double encrypted bytes can be saved on any s3

The idea behind this project is to make the file hosting as anonymous as possible. If / when this gets put online it'll have zero logs and you can only see file contents when authorized by the original file uploader.

How to setup

Make sure you have docker installed.

docker compose up

Yeah, that's really it. It should now pull the Postgresql image & build the webserver. You should still setup Diesel & run the migrations though!

Adding s3 buckets

To add your s3 bucket to the database you'll need to attach to the postgres service in docker. First figure out what the postgres container name is:

> $ docker ps                                              ⬡ 18.18.1 [±main ●]
CONTAINER ID   IMAGE                COMMAND                  CREATED         STATUS         PORTS                    NAMES
de605f0e7c17   cipherdrop-backend   "backend sh -c ' unt…"   9 minutes ago   Up 3 seconds   0.0.0.0:8080->8080/tcp   cipherdrop
1333910cccd8   postgres:latest      "docker-entrypoint.s…"   9 minutes ago   Up 3 seconds   5432/tcp                 postgres_container

This usually is postgres_container, but just make sure by checking.

Now run the following command to attach to the container:

docker exec -it postgres_container psql -U root -d db

You can replace postgres_container with the name of your postgres container. While being attacked to the container you can run any SQL query. The query to insert a s3 bucket is the following:

INSERT INTO s3_buckets (bucket_name, region, endpoint, access_key, secret_key)
VALUES ('NAME', 'REGION', 'ENDPOINT', 'ACCESS_KEY', 'SECRET_KEY')

With the following example bucket link: my_bucket.fsn1.your-objectstorage.com (Hetzner):
NAME: my_bucket.fsn1,
REGION: fsn1,
ENDPOINT: your-objectstorage.com,
ACCESS_KEY: your access key,
SECRET_KEY: your secret key

Why the NAME also contains the region? No idea, it's just how the package I used works.

Development setup

This is actually pretty simple, you just have to make sure you have Docker installed & running, and run the following command to start a Postgres instance:

docker compose -f compose-dev.yml up

After this you need to copy the env.example into .env in the backend folder and change the DATABASE_URL value to your database connection string. (which should be postgres://root:toor@localhost/db)

Diesel setup

Make sure to install the Diesel cli. These are the commands I quickly copied over, but make sure to check if they're not outdated:

# Linux/MacOS
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/diesel-rs/diesel/releases/latest/download/diesel_cli-installer.sh | sh

# Windows
powershell -c "irm https://github.com/diesel-rs/diesel/releases/latest/download/diesel_cli-installer.ps1 | iex"

Run the database migrations using diesel:

diesel migration run

Start

Now finally start the server with hot reload:

cargo watch -w src -w ../frontend -x run

Thank you for reading

Core symbols most depended-on inside this repo

error
called by 4
frontend/index.js
progress
called by 2
frontend/index.js
handleFiles
called by 2
frontend/index.js
arrayBufferToBase64Url
called by 2
frontend/index.js
error
called by 2
frontend/file.js
handleFile
called by 2
frontend/file.js
base64UrlToArrayBuffer
called by 2
frontend/file.js
get_file
called by 2
backend/src/files.rs

Shape

Function 28
Class 10
Method 5

Languages

Rust51%
TypeScript49%

Modules by API surface

frontend/index.js13 symbols
frontend/file.js8 symbols
backend/src/actions.rs4 symbols
backend/src/s3.rs3 symbols
backend/src/models.rs3 symbols
backend/src/crypt.rs3 symbols
backend/src/routes/mod.rs2 symbols
backend/src/routes/file_html.rs2 symbols
backend/src/files.rs2 symbols
backend/src/routes/upload.rs1 symbols
backend/src/routes/download_file.rs1 symbols
backend/src/main.rs1 symbols

Datastores touched

dbDatabase · 1 repos

For agents

$ claude mcp add CipherDrop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact