A simple way to run Flask apps on tor from your machine.
Project description
flask-tor
Run your flask website in tor using flask_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.
Disclaimer:-
Use it only for educational purpose.
Compatability
Python 3.6+ is required.
Installation
pip install flask-tor
Quickstart
- Import with
from flask_tor import run_with_tor
. - call function
run_with_tor()
, store as variable and give it as port argument in flask app.
# flask_tor_example.py
from flask import Flask
from flask_tor import run_with_tor
app = Flask(__name__)
port = run_with_tor()
@app.route("/")
def hello():
return "Hello World!"
if __name__ == '__main__':
app.run(port=port)
Running the example:
python flask_tor_example.py
connecting_to_tor: 100% - Done
* Running on <random_adress>.onion
* Serving Flask app "main"
* Debug mode: off
* Running on http://127.0.0.1:<port>/
Credit :- onionshare
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
flask-tor-1.0.1.tar.gz
(14.8 kB
view hashes)
Built Distribution
flask_tor-1.0.1-py3-none-any.whl
(16.3 kB
view hashes)
Close
Hashes for flask_tor-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2613953dff3427f405a391e8bda9796540a080cfec3d3bfd895c98ee19cbcab0 |
|
MD5 | 130da8ba18ab16e88765dc5285c747b6 |
|
BLAKE2b-256 | 97e9a735bd2e254f6bb5c4895ee6ea0dce2cd4d848d32bc581964eed75072ba1 |