Skip to content

FujiwaraChoki/tor-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tor Demonstration in Python

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.

Installation

Windows

  1. Download and install the Tor Browser Bundle from https://www.torproject.org/.
  2. 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
  1. Install the required packages:
pip install -r requirements.txt

Linux

  1. Install the Tor package:
sudo apt install tor
  1. 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
  1. Install the required packages:
pip install -r requirements.txt

Note

Add this to your torrc file:

FetchDirInfoEarly 1
FetchDirInfoExtraEarly 1
FetchUselessDescriptors 1
DownloadExtraInfo 1
ControlPort 9051
SocksPort 9050

Usage

Windows

  1. Start the Tor Browser Bundle and click on the Connect button.
  2. Run the script:
python src/main.py

Linux

  1. Start the Tor service:
sudo service tor start
  1. Run the script:
python src/main.py

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

About

Demo on how to use TOR Proxies in Python.

Topics

Resources

License

Stars

Watchers

Forks

Languages