. .
.n . . n.
. .dP dP 9b 9b. .
4 qXb . dX Xb . dXp t
dX. 9Xb .dXb __ __ dXb. dXP .Xb
9XXb._ _.dXXXXb dXXXXbo. .odXXXXb dXXXXb._ _.dXXP
9XXXXXXXXXXXXXXXXXXXVXXXXXXXXOo. .oOXXXXXXXXVXXXXXXXXXXXXXXXXXXXP
`9XXXXXXXXXXXXXXXXXXXXX'~ ~`OOO8b d8OOO'~ ~`XXXXXXXXXXXXXXXXXXXXXP'
`9XXXXXXXXXXXP' `9XX' DIE `98v8P' HUMAN `XXP' `9XXXXXXXXXXXP'
~~~~~~~ 9X. .db|db. .XP ~~~~~~~
)b. .dbo.dP'`v'`9b.odb. .dX(
,dXXXXXXXXXXXb dXXXXXXXXXXXb.
dXXXXXXXXXXXP' . `9XXXXXXXXXXXb
dXXXXXXXXXXXXb d|b dXXXXXXXXXXXXb
9XXb' `XXXXXb.dX|Xb.dXXXXX' `dXXP
`' 9XXXXXX( )XXXXXXP `'
XXXX X.`v'.X XXXX
XP^X'`b d'`X^XX
X. 9 ` ' P )X
`b ` ' d'
` '
Rotate your IP from the terminal using Tor or proxy servers.
- Rotate your public IP via Tor (NEWNYM signal), proxy servers, or hybrid mode
- System-wide mode: routes all PC traffic through Tor via transparent proxy (iptables)
- Interactive CLI prompts or full command-line argument support
- Displays old and new IP after each rotation
- Live status: rotation count, current IP, uptime
- Configurable via TOML file
- Colored terminal output with ASCII logo
- Automatic cleanup: restores iptables and torrc on exit
- Rust 1.75+ (for building from source)
- Tor installed and running (for
torandhybridmodes)- Tor control port enabled (default:
9051) - Tor SOCKS proxy running (default:
9050)
- Tor control port enabled (default:
# Debian/Ubuntu/Kali
sudo apt install torEnable the control port and cookie auth in /etc/tor/torrc:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
sudo systemctl enable tor
sudo systemctl start torgit clone https://github.com/yourusername/phantomip.git
cd phantomip
cargo build --releaseThe binary will be at target/release/phantomip.
cargo install --path .Use the included run.sh script — it handles Tor startup automatically:
# Rotate IP via Tor (only phantomip traffic)
./run.sh
# System-wide mode: ALL PC traffic routed through Tor, IPv6 blocked
sudo ./run.sh --system--system mode:
- Adds
TransPortandDNSPortto torrc - Saves current iptables rules and redirects all TCP/DNS through Tor
- Blocks UDP entirely to prevent WebRTC/STUN leaks (browsers use UDP to discover the real public IP via STUN servers, bypassing any TCP proxy)
- Blocks IPv6 entirely to prevent IPv6 leaks (Tor does not support IPv6 exit nodes reliably)
- On
Ctrl+C, automatically restores iptables, ip6tables, and torrc to their original state
# Interactive mode (prompts for settings)
phantomip
# Rotate via Tor every 30 seconds, run for 5 minutes
phantomip --mode tor --interval 30 --duration 300
# Rotate via proxy list indefinitely every 15 seconds
phantomip --mode proxy --interval 15 --duration 0
# Use a custom config file
phantomip --config ./my-config.toml| Flag | Description | Default |
|---|---|---|
--mode |
Rotation mode: tor, proxy, hybrid |
tor |
--interval |
Seconds between rotations | 30 |
--duration |
Total runtime in seconds (0=forever) |
0 |
--config |
Path to a TOML config file | — |
Edit config/default.toml:
[tor]
control_host = "127.0.0.1"
control_port = 9051
password = ""
socks_port = 9050
[proxy]
list = [
"socks5://127.0.0.1:1080",
]
[general]
ip_check_url = "https://api.ipify.org"
interval = 30
duration = 0
mode = "tor"- Tor enforces a ~10 second cooldown between NEWNYM signals. PhantomIP respects this automatically — if your interval is shorter than 10s in Tor mode, it will wait.
- The new IP is not guaranteed to be different from the previous one.
- Tor must be running with the control port enabled and properly authenticated.
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes with clear commit messages
- Run tests:
cargo test - Run clippy:
cargo clippy -- -D warnings - Submit a pull request
Please follow the existing code style and add tests for new functionality.
This project is dual-licensed under:
Choose whichever fits your needs.