Skip to content

FelipeKreulich/phantom-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

          .                                                      .
        .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'
                               `             '

PhantomIP

Rotate your IP from the terminal using Tor or proxy servers.

License: MIT Rust Build


Features

  • Rotate your public IP via Tor (NEWNYM signal), proxy servers, or hybrid mode
  • 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 dragon logo
  • Cross-platform: Linux, macOS, Windows

Requirements

  • Rust 1.75+ (for building from source)
  • Tor installed and running (for tor and hybrid modes)
    • Tor control port enabled (default: 9051)
    • Tor SOCKS proxy running (default: 9050)

Setting up Tor

# Debian/Ubuntu
sudo apt install tor

# macOS
brew install tor

# Enable the control port in /etc/tor/torrc:
# ControlPort 9051
# HashedControlPassword <your-hashed-password>

sudo systemctl restart tor

Installation

From source

git clone https://github.com/yourusername/phantomip.git
cd phantomip
cargo build --release

The binary will be at target/release/phantomip.

With cargo install

cargo install --path .

Usage

Interactive mode

Simply run the binary — it will prompt you for settings:

phantomip
[?] Rotation interval (seconds) [30]: 20
[?] Duration in seconds (0 = infinite) [0]: 120
[?] Mode (tor / proxy / hybrid) [tor]: tor

Command-line arguments

# 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

CLI Options

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

Configuration

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 Limitations

  • 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.

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes with clear commit messages
  4. Run tests: cargo test
  5. Run clippy: cargo clippy -- -D warnings
  6. Submit a pull request

Please follow the existing code style and add tests for new functionality.

License

This project is dual-licensed under:

Choose whichever fits your needs.

About

PhantomIP is a CLI tool to rotate your IP using Tor or proxies. It features a dragon ASCII logo, configurable interval/duration, real-time IP display, and logging. Modular, extensible, and open source for developers and privacy enthusiasts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages