Skip to main content

A simple way to run Django apps on tor from your machine.

Project description

django-tor

Run your django website on tor using django_tor.It doesn’t interfere with other tor processes on your computer, so you can use the Tor Browser or the system tor on their own.

PyPI version Downloads Downloads Python 3.6

Disclaimer:-

Use it only for educational purpose.

Features

  • No need root permission
  • Multiple instances

Compatability

Python 3.6+ is required.

Installation

pip install django-tor

Uses

set ALLOWED_HOSTS to * in settings.py

ALLOWED_HOSTS = ['*']

add this lines in manage.py in your django project.

from django_tor import run_with_tor
from django.core.management.commands.runserver import Command as runserver

if sys.argv[1] == 'runserver':
    host, port = run_with_tor()
    runserver.default_port = str(port)
    from djangoTor.settings import ALLOWED_HOSTS
    ALLOWED_HOSTS.append(host)

Run django server with noreload argument.

python3 manage.py runserver --noreload

Credit :- onionshare

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tor-1.0.1.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

django_tor-1.0.1-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page