Turn any Gunicorn application into a Tor Onion Service
Project description
Gunicorn Torify
Turn any Gunicorn server into a Tor Onion Service
Installation
It's available on PyPI! Just use pip to install
$ pip install gunicorn-torify
You must have Tor installed to use gunicorn-torify. This would might look like
# Arch
$ pacman -S tor
# Debian/Ubuntu
$ apt install tor
# Alpine
$ apk add tor
Usage
If you don't use a Gunicorn config file, then create some python file such as ./gunicorn-conf.py
with the line
from gunicorn_torify import on_starting, on_exit
Then when starting Gunicorn, be sure to include the --config ./gunicorn-conf.py
flag.
Contributing
To setup the development environment, it's convenient to use pyenv and the pyenv virtualenv plugin. For example
$ pyenv virtualenv 3.8.1 gunicorn-torify-3.8
$ pyenv activate gunicorn-torify-3.8
$ pip install -r requirements_dev.txt
TODO
- Example with FastAPI & uvicorn worker for Gunicorn
- Load balancing support?
- Docs about persistence of the secrets directory
- Proper tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gunicorn_torify-19.12.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 310f198f2c0364c4fb917b233bd6f38bef6255260e18c68fdca150ef9540cda5 |
|
MD5 | 8190414ef666985a5c1ab0da15a36be0 |
|
BLAKE2b-256 | 264aa0a618f45c10c59f6c7707960872156f5d421deecab6a1f8bd87226f58e1 |