This project contains a Python script that, when run, will download GeoLite database and Tor bridge list. The script will then parse the ASN, country, and other information of Tor bridges through the GeoLite database.
MaxMind GeoLite2: https://github.com/P3TERX/GeoLite.mmdb/
Tor-Bridges-Collector: https://github.com/scriptzteam/Tor-Bridges-Collector
- Clone this repo to your local machine.
- cd into the project directory
- Create a virtual environment:
python3 -m venv myenv
- Activate the virtual environment: Windows:
myenv\Scripts\activate
Mac/Linux:source myenv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- For Linux systems, install unrar with:
sudo apt install unrar
For macOS:brew install carlocab/personal/unrar
Not installing unrar will cause extraction errors - Create a .env file in the project directory and modify according to your needs:
# Whether to use proxy for downloading files (true/false)
USE_PROXY=false
# Proxy URL (only effective when USE_PROXY=true)
# Supports HTTP and SOCKS proxy
# Examples:
# HTTP proxy: http://127.0.0.1:8080
# SOCKS5 proxy: socks5://127.0.0.1:1080
PROXY_URL=
# Number of concurrent processing threads (recommended 1-20)
MAX_WORKERS=15
# Other optional configurations
# HTTP request timeout in seconds
REQUEST_TIMEOUT=30
# Log level (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO
- Run
python tor_bridge_analyzer.py
The primary repository address is on GitHub: https://github.com/SexyOnion/tor_bridge_analyzer
Considering the Chinese government's restrictions on GitHub and GitHub's own file size limitations, this repository has a mirror on Gitea: https://gitea.com/Xijinping/tor_bridge_analyzer