Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Tor IP Rotator for macOS

Production-ready Python script to automatically rotate Tor exit IP addresses on macOS.

Prerequisites

  • macOS (tested on macOS 15+)
  • Homebrew package manager
  • Python

Install dependencies

brew install tor python
pip3 install stem requests

Tor Configuration

Edit /opt/homebrew/etc/tor/torrc (Apple Silicon) or /usr/local/etc/tor/torrc (Intel):

ControlPort 9051
CookieAuthentication 1
# OR use hashed password instead:
# HashedControlPassword 16:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CookieAuthFileGroupReadable 1
SOCKSPort 9050

Generate a hashed password (if using password auth):

tor --hash-password "your_password"

Start Tor service (or run manually: tor):

brew services start tor

Also in Telegram: CleanShot 2026-07-02 at 18 45 47@2x

Verify Tor is running:

curl --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip

Usage

# Show help
python3 main.py -h

# Rotate IP every 60 seconds (default)
python3 main.py

# Custom interval (seconds)
python3 main.py -i 30

# Custom control port
python3 main.py -p 9051

# With password authentication
python3 main.py --password "your_password"

# Rotate once and exit
python3 main.py --once

# Validate Tor setup and configuration
python3 main.py --validate

Legal & Ethical Notice

This tool is provided for educational and privacy research purposes only.

  • Legal compliance: Use in accordance with your local laws and regulations
  • Terms of Service: Respect Tor network policies and exit node operators' policies
  • No illegal activities: Do not use for illegal activities, abuse, or harassment
  • Respect rate limits: Rotate IPs responsibly (minimum 10 second interval)
  • No warranty: Use at your own risk. No liability for misuse or damages

License

MIT License - See LICENSE file for details.

References (Thanks to :)

About

Python script to automatically rotate Tor exit IP addresses on macOS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages