Skip to content

Gerijacki/anonTraff

Repository files navigation

AnonTraff — Dynamic Tor IP Changer

CI PyPI Python versions License

AnonTraff rotates your external IP address by reloading the Tor service at a configurable interval. Traffic is proxied via SOCKS5 on 127.0.0.1:9050.


Requirements

  • Linux with systemd
  • tor installed and reachable by systemctl
  • Python ≥ 3.9
sudo apt install tor

Installation

From PyPI (recommended):

pip install anontraff

From source:

git clone https://github.com/Gerijacki/anonTraff.git
cd anonTraff
make install         # pip install -e . + man page + completions

Quick start

# Change IP 10 times, every 60 seconds
anontraff -i 60 -c 10

# Infinite rotation every 30 seconds
anontraff -i 30 -c 0

# Just check your current Tor IP
anontraff --check

# Interactive mode (prompts for interval and count)
anontraff

Configure your browser/app SOCKS5 proxy to 127.0.0.1:9050.

CLI reference

Flag Description
-i, --interval SECS Seconds between IP changes (positive integer)
-c, --count N Number of changes; 0 = infinite loop
--check Print current Tor IP and exit
-V, --version Show version
-h, --help Show help

Configuration

Create ~/.config/anonTraff/config.toml to override defaults:

socks_host       = "127.0.0.1"
socks_port       = 9050
ip_check_url     = "https://api.ipify.org"
default_interval = 60
default_count    = 0
request_timeout  = 10

Development

git clone https://github.com/Gerijacki/anonTraff.git
cd anonTraff
pip install -e ".[dev]"

make test    # run pytest (coverage ≥ 80%)
make lint    # ruff + mypy
make check   # lint + test

See CONTRIBUTING.md for the full guide.

Project structure

src/anontraff/
├── cli.py      Click CLI + signal handler
├── config.py   TOML config loader
├── deps.py     Dependency detection
├── ip.py       IP fetching via SOCKS5
├── tor.py      Tor service management
└── ui.py       Rich terminal output
tests/          pytest suite

License

MIT — see LICENSE.

Disclaimer

AnonTraff is intended for educational and personal privacy use only. The developers are not responsible for any misuse.

About

AnonTraff - Dynamic Tor IP Changer

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors