This is a simple demonstration of how to use the Tor network in Python. This demonstration uses the requests
library to make HTTP requests through the Tor network, and the stem
library to control the Tor process.
- Download and install the Tor Browser Bundle from https://www.torproject.org/.
- Clone the repository and activate the virtual environment:
git clone https://github.com/FujiwaraChokik/tor-demo.git
cd tor-demo
python -m venv .venv
.venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
- Install the Tor package:
sudo apt install tor
- Clone the repository and activate the virtual environment:
git clone https://github.com/FujiwaraChokik/tor-demo.git
cd tor-demo
python -m venv .venv
source .venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
Add this to your torrc
file:
FetchDirInfoEarly 1
FetchDirInfoExtraEarly 1
FetchUselessDescriptors 1
DownloadExtraInfo 1
ControlPort 9051
SocksPort 9050
- Start the Tor Browser Bundle and click on the
Connect
button. - Run the script:
python src/main.py
- Start the Tor service:
sudo service tor start
- Run the script:
python src/main.py
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.