Privfiles - Encrypted file storage using Fernet with zero Javascript
Source code for the onion service: l3n6v6dm63frml22tlmzacnasvp7co7wylu4hhcs34ukxe7q56yb4tyd.onion
Previews
Setup
Git clone
git clone https://github.com/privfiles/privfiles
Install Mongodb
Install python requirements
pip3 install -r requirements.txt
Nginx
server {
listen 127.0.0.1:8080;
client_max_body_size 4G;
chunked_transfer_encoding on;
location ~ /admin {
auth_basic "privfiles admin";
auth_basic_user_file /etc/apache2/.htpasswd;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://uvicorn;
}
location / {
proxy_redirect off;
proxy_buffering off;
proxy_pass http://uvicorn;
}
}
upstream uvicorn {
server unix:/tmp/uvicorn.sock;
}
Adding fonts for recaptcha
Add .ttf fonts to privfiles/fonts
for recaptcha generation
Configure
run.py
import uvicorn
from privfiles import PrivFiles
from privfiles.settings import B2Settings
app = PrivFiles(
backblaze_settings=B2Settings(
key_id="...",
application_key="...",
bucket_id="..."
)
)
if __name__ == "__main__":
uvicorn.run(
app,
uds="/tmp/uvicorn.sock",
log_level="error"
)
Running
Use something like pm2 to run run.py
& api_task.py
in the background.
Thanks to
- cryptography by The Python Cryptographic Authority and individual contributors
- motor by A. Jesse Jiryu Davis
- pymongo by Bernie Hackett
- starlette by Tom Christie
- anyio by Alex Grönholm
- idna by Kim Davies
- sniffio by Nathaniel J. Smith
- Jinja by Armin Ronacher
- backblaze by WardPearce
- httpx by Tom Christie
- certifi by Kenneth Reitz
- charset-normalizer by Ahmed TAHRI @Ousret
- sniffio by Nathaniel J. Smith
- httpcore by Tom Christie
- h by Seth Michael Larson
- anyio by Alex Grönholm
- idna by Kim Davies
- aiofile by Dmitry Orlov [email protected]
- caio by Dmitry Orlov [email protected]
- aiofiles by Tin Tvrtkovic
- asynctest by Martin Richard
- sphinxcontrib-trio by Nathaniel J. Smith
- Sphinx by Georg Brandl
- sphinxcontrib-applehelp by Georg Brandl
- sphinxcontrib-devhelp by Georg Brandl
- sphinxcontrib-jsmath by Georg Brandl
- sphinxcontrib-htmlhelp by Georg Brandl
- sphinxcontrib-serializinghtml by Georg Brandl
- sphinxcontrib-qthelp by Georg Brandl
- Jinja by Armin Ronacher
- Pygments by Georg Brandl
- docutils by David Goodger
- snowballstemmer by Snowball Developers
- Babel by Armin Ronacher
- pytz by Stuart Bishop
- alabaster by Jeff Forcier
- imagesize by Yoshiki Shibukawa
- requests by Kenneth Reitz
- setuptools by Python Packaging Authority
- packaging by Donald Stufft and individual contributors
- pyparsing by Paul McGuire
- sphinx-material by Kevin Sheppard
- BeautifulSoup by Leonard Richardson
- css-html-js-minify by Juan Carlos
- lxml by lxml dev team
- captcha by Hsiaoming Yang
- Pillow by Alex Clark (PIL Fork Author)
- uvicorn by Tom Christie
- asgiref by Django Software Foundation
- click by Armin Ronacher
- h by Seth Michael Larson
- itsdangerous by Armin Ronacher
- python-dotenv by Saurabh Kumar
- bcrypt by The Python Cryptographic Authority developers
- python-multipart by Andrew Dunham