Skip to content

naborajs/Termux-Tor-IP-Rotator


Ghost Engine v5 Platform Support TOR Proxy Support Privacy Badge

GitHub Stars GitHub Forks License Last Commit



   ██████╗ ██╗  ██╗ ██████╗ ███████╗████████╗
  ██╔════╝ ██║  ██║██╔═══██╗██╔════╝╚══██╔══╝
  ██║  ███╗███████║██║   ██║███████╗   ██║
  ██║   ██║██╔══██║██║   ██║╚════██║   ██║
  ╚██████╔╝██║  ██║╚██████╔╝███████║   ██║
   ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚══════╝   ╚═╝
  

👻 Ghost Engine v5

Advanced TOR Identity Rotation & Privacy Proxy Framework

Smart TOR IP rotation, SOCKS5 + HTTP proxy routing, health checks, and cross-platform privacy tooling for Termux, Linux, macOS, and WSL2.


Repository Issues Releases Author



🌀 TOR Rotation 🌐 Proxy Ready 🧠 Diagnostics 🖥 Multi-Platform
Manual + auto identity rotation with duplicate handling SOCKS5 and Privoxy HTTP proxy support Health checks, logs, exit-node verification, and recovery Built for Termux, Linux, macOS, and WSL2 workflows

Built and maintained by Naboraj Sarkar • NS GAMMING / NS CODEX

👀 Ghost Engine Preview

A quick look at Ghost Engine’s command center and automatic TOR rotation dashboard.

Ghost Engine Home Terminal Preview
Home / Command Center




Ghost Engine Auto Rotation Preview
Automatic TOR Rotation Dashboard

⚠️ Responsible Use

Ghost Engine is intended for:

  • privacy-focused learning and experimentation
  • TOR routing / proxy testing
  • research, lab use, and controlled security workflows

It is not intended for illegal activity, abuse, or unauthorized access.
You are responsible for how you use this tool and for complying with your local laws and network policies.


🧠 How Ghost Engine Works

A visual overview of Ghost Engine’s privacy workflow, TOR routing model, proxy layers, platform support, and core features across Termux, Linux, macOS, and WSL2.

Ghost Engine Architecture Banner
Ghost Engine v5 — TOR identity rotation, proxy routing, health checks, and cross-platform privacy workflow

⚡ Quick Install (any platform)

git clone https://github.com/naborajs/Termux-Tor-IP-Rotator.git
cd Termux-Tor-IP-Rotator
sh bootstrap.sh install

The bootstrap layer (bootstrap.sh) automatically:

  • Normalizes line endings (CRLF → LF) for all shell scripts
  • Sets executable permissions
  • Dispatches to the platform-specific installer

Other bootstrap commands:

sh bootstrap.sh update      # Pull latest + reinstall
sh bootstrap.sh uninstall   # Remove Ghost Engine

Windows/WSL note: If you edit shell scripts on Windows, Git may insert CRLF line endings. The bootstrap and all installer scripts now include automatic CRLF self-healing. See the Shell Safety section below for details.

Full documentation is in the docs/ directory — architecture, platform guides, quickstart, and troubleshooting. See also CONTRIBUTING.md, SECURITY.md, and SUPPORT.md.


🚀 Quick Start — Android (Termux) Recommended

Ghost Engine works very well on Android through Termux and this is one of the easiest ways to use it on mobile.

Important: Install Termux from F-Droid, not from the Play Store. The Play Store build is outdated and can break package installation, networking tools, and Ghost Engine itself.

Install Termux from F-Droid

https://f-droid.org/en/packages/com.termux/


1) Update Termux

Start by updating the package lists and upgrading installed packages:

pkg update -y && pkg upgrade -y

2) Install Git

pkg install git -y

3) Clone the Ghost Engine Repository

git clone https://github.com/naborajs/Termux-Tor-IP-Rotator.git
cd Termux-Tor-IP-Rotator

4) Run the Installer

Ghost Engine includes a built-in installer that handles dependency installation and global command setup for Termux.

chmod +x install.sh #NOT REQURED, but recommended to ensure the script is executable.
bash install.sh # MAIN COMMAND TO RUN THE INSTALLER.

The installer will automatically:

  • detect that you are using Termux
  • install required packages such as TOR, Privoxy, curl, and netcat
  • install the global ns-ghost command
  • prepare Ghost Engine’s runtime environment for mobile use

🛠 Installer Preview

Ghost Engine’s installer auto-detects your platform, installs required dependencies, prepares the runtime environment, and sets up the global ns-ghost launcher.

Ghost Engine Installer Preview
Ghost Engine installer running in the terminal
---

5) If Privoxy Fails to Install in Termux

Some Termux setups may require the TUR repository for Privoxy.

If the installer reports a Privoxy installation problem, run:

pkg install tur-repo -y
pkg install privoxy -y

Then run the installer again:

bash install.sh

6) Launch Ghost Engine

Once installation is complete, start Ghost Engine with:

ns-ghost

On the first launch, wait around 10–20 seconds while TOR builds its first secure circuit.


7) What the Installer Does on Termux

The Termux installer is designed to simplify setup as much as possible.

It will:

  • install Ghost Engine’s required dependencies
  • install the ns-ghost launcher into your Termux environment
  • prepare local TOR + Privoxy runtime files
  • help standardize the environment so Ghost Engine behaves consistently across fresh Termux installs

8) Verify That Ghost Engine Is Working

Once Ghost Engine is running, test whether traffic is going through TOR:

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

You can also compare your real IP vs your TOR IP:

Real IP

curl https://api64.ipify.org

TOR-routed IP

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

If the two IPs are different, Ghost Engine is routing through TOR successfully.


📱 Android Wi-Fi Proxy Setup

Example of configuring a manual Wi-Fi proxy on Android so supported traffic can be routed through Ghost Engine’s local Privoxy HTTP proxy running inside Termux.

Android Wi-Fi proxy setup for Ghost Engine
Manual Wi-Fi proxy configuration on Android for Ghost Engine

9) Route Android Traffic Through Ghost Engine (Wi-Fi Proxy)

Ghost Engine runs inside Termux, so to route your Android phone or tablet's traffic through it, you need to configure Android's Wi-Fi proxy settings to point at the Ghost Engine HTTP proxy.

Step-by-step Wi-Fi proxy setup

  1. Open Android SettingsWi-Fi
  2. Long-press your currently connected Wi-Fi network → tap Modify network (or Manage network settings)
  3. Expand Advanced options
  4. Set Proxy to Manual

Enter the following:

Field Value
Proxy hostname 127.0.0.1
Proxy port 8118

Because Ghost Engine and Android are on the same device, 127.0.0.1 (localhost) is the correct address. This is not a remote proxy — it is the Termux environment on your phone.

What this does

Once the Wi-Fi proxy is enabled, your Android device sends HTTP/HTTPS traffic through:

Android → 127.0.0.1:8118 (Privoxy in Termux) → SOCKS5 (TOR) → Internet

Apps that respect the system Wi-Fi proxy will now route through Ghost Engine. Apps that ignore the proxy (some browsers, games, streaming apps) will still connect directly — see the notes below.

Verify on Android

After enabling the proxy, open a browser on your Android device and visit:

Important Android limitations

  • Not all apps respect the Wi-Fi proxy. System apps, streaming services, and some games may bypass it entirely. Ghost Engine works best with browser traffic and proxy-aware apps.
  • If Ghost Engine stops while the proxy is enabled, Android will still try to route traffic through 127.0.0.1:8118 — but nothing will be listening there, and internet access will break. Disable the Wi-Fi proxy before stopping Ghost Engine.
  • Terminal tools inside Termux can use the proxy directly via curl --proxy http://127.0.0.1:8118 ... or curl --socks5 127.0.0.1:9050 ... without needing the Wi-Fi proxy.
  • Wake lock recommended: Running termux-wake-lock before starting Ghost Engine helps prevent Android from killing Termux in the background.

10) Notes for Android / Termux Users

  • Some Android apps do not automatically use the Termux proxy. Ghost Engine works best for:

    • terminal-based tools
    • local testing
    • browsers / apps that allow manual proxy configuration
  • On slower mobile networks, TOR bootstrapping may take longer than on desktop.

  • If you are rotating IPs very quickly, expect occasional duplicate exit nodes — that is normal TOR behavior.


Update & Removal Terminal Preview

Ghost Engine Installer Preview

Ghost Engine installer setup flow — platform detection, dependency installation, binary setup, and guided onboarding.


Ghost Engine Uninstaller Preview

Ghost Engine uninstaller flow — warning prompts, launcher cleanup, data removal, and full uninstall summary.

## 11) Updating or Removing Ghost Engine on Termux

Update to the latest version

bash update.sh

Uninstall Ghost Engine

bash uninstall.sh

12) If Something Goes Wrong

If Ghost Engine does not start correctly in Termux:

  • run the built-in Health Check
  • confirm that TOR and Privoxy installed successfully
  • retry bash install.sh
  • if Privoxy failed earlier, install tur-repo and reinstall it manually
  • check the Troubleshooting section of the README

Tip: If you only want the fastest setup path on Android, the normal flow is: pkg update → install git → clone repo → bash install.sh → ns-ghost


💻 Installation — Linux (Debian / Ubuntu / Kali / Parrot)

Ghost Engine supports Debian-based Linux distributions including:

  • Ubuntu
  • Debian
  • Kali Linux
  • Parrot OS
  • and other compatible apt-based systems

The recommended installation method is to use Ghost Engine’s built-in installer, which automatically installs dependencies, configures the global launcher, and disables conflicting system TOR / Privoxy services if needed.


1) Install Git (if not already installed)

sudo apt update
sudo apt install git -y

2) Clone the Ghost Engine Repository

git clone https://github.com/naborajs/Termux-Tor-IP-Rotator.git
cd Termux-Tor-IP-Rotator

3) Run the Installer

chmod +x install.sh
bash install.sh

The installer will automatically:

  • detect your Linux environment
  • install required dependencies (tor, privoxy, curl, netcat)
  • install the global ns-ghost launcher
  • add ~/.local/bin to your PATH if needed
  • stop / disable conflicting system TOR or Privoxy services that could break Ghost Engine

4) Start Ghost Engine

After installation completes, launch Ghost Engine with:

ns-ghost

If the command is not found immediately, either:

  • open a new terminal session, or
  • reload your shell profile:
source ~/.bashrc

If you use Zsh instead of Bash:

source ~/.zshrc

5) What the Installer Handles Automatically

Ghost Engine’s Linux installer is designed to prevent the most common setup problems.

It installs:

  • TOR
  • Privoxy
  • curl
  • netcat / nc

It also helps avoid conflicts by:

  • stopping system TOR if it is already running
  • stopping system Privoxy if it is already running
  • disabling those services if they would hijack Ghost Engine’s ports
  • preparing Ghost Engine to run its own isolated TOR + Privoxy environment

This is important because Ghost Engine expects to manage ports like:

  • 9050 → TOR SOCKS5
  • 9051 → TOR control port
  • 8118 → Privoxy HTTP proxy

If another TOR / Privoxy instance is already using those ports, Ghost Engine may fail to start correctly or route traffic through the wrong service.


6) Manual Dependency Command (Reference Only)

You usually do not need to run this manually because install.sh already handles it, but for reference Ghost Engine depends on:

sudo apt update
sudo apt install tor privoxy curl netcat-openbsd -y

7) Verify That Ghost Engine Works

Once Ghost Engine is running, verify that traffic is actually going through TOR:

Check TOR-routed IP through the HTTP proxy

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

Check TOR-routed IP through the SOCKS5 proxy directly

curl --socks5 127.0.0.1:9050 https://api64.ipify.org

If the returned IP is different from your normal internet IP, Ghost Engine is working correctly.

You can also visit:


8) Route Browser & CLI Traffic on Linux

Ghost Engine gives you two proxy endpoints for routing traffic:

Protocol Address Use for
HTTP Proxy (Privoxy) 127.0.0.1:8118 Browsers, HTTP clients, system proxy
SOCKS5 (TOR) 127.0.0.1:9050 Apps that support SOCKS natively

Route terminal tools

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org
curl --socks5 127.0.0.1:9050 https://api64.ipify.org

Route a browser

Configure your browser's manual proxy settings:

Setting Value
HTTP Proxy 127.0.0.1:8118
SOCKS Host 127.0.0.1:9050

After configuring, visit https://check.torproject.org/ to confirm.

Note: Browsers route traffic independently of terminal tools. Proxying your browser does not automatically proxy your terminal, and vice versa.


9) Linux Notes

  • Ghost Engine is designed to run its own runtime configuration instead of depending on your system’s default TOR / Privoxy configuration.
  • If you already use TOR or Privoxy for other tools, be aware that Ghost Engine may need those ports free to work properly.
  • If you are using a minimal distro or custom environment, make sure curl, nc, tor, and privoxy are available in your PATH.

10) Updating and Removing Ghost Engine on Linux

Update to the latest version

bash update.sh

Uninstall Ghost Engine

bash uninstall.sh

11) If Something Goes Wrong

If Ghost Engine installs correctly but still does not work:

  1. Run the built-in Health Check from the Ghost Engine menu
  2. Make sure no old TOR / Privoxy service is still using ports 9050, 9051, or 8118
  3. Verify that ns-ghost is in your PATH
  4. Check the project’s Troubleshooting section for Linux / proxy / port-conflict fixes

Tip: On Linux, most Ghost Engine startup problems come from port conflicts, old system TOR services, or the shell not yet seeing ~/.local/bin in PATH.


☕ macOS (Intel + Apple Silicon)

Ghost Engine supports macOS on both Intel and Apple Silicon Macs. The recommended setup uses Homebrew for installing TOR, Privoxy, and required utilities.


Requirements

Before installing Ghost Engine on macOS, make sure you have:

  • macOS with Terminal access
  • Homebrew
  • an active internet connection
  • permission to install packages locally

1) Install Homebrew

If Homebrew is not already installed, run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After installation, verify it:

brew --version

2) Clone the Ghost Engine Repository

git clone https://github.com/naborajs/Termux-Tor-IP-Rotator.git
cd Termux-Tor-IP-Rotator

3) Run the Installer

Ghost Engine now includes a dedicated installer that automatically installs dependencies and sets up the global ns-ghost command.

chmod +x install.sh
bash install.sh

The installer will:

  • detect that you are on macOS
  • use Homebrew to install required dependencies
  • install the Ghost Engine launcher command
  • prepare the environment for running ns-ghost

4) Start Ghost Engine

After installation completes, launch Ghost Engine with:

ns-ghost

If the command is not available immediately, open a new Terminal session and run it again.


5) What the Installer Uses on macOS

Ghost Engine installs / checks the following tools through Homebrew:

brew install tor privoxy curl netcat

If one of these is already installed, Homebrew will simply keep the existing package.


6) Verify That Ghost Engine Works

Once Ghost Engine is running, you can verify TOR routing using:

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

You can also open:

If the IP shown there is different from your normal internet IP, Ghost Engine is routing traffic through TOR successfully.


7) Route Browser & CLI Traffic on macOS

Ghost Engine gives you two proxy endpoints for routing traffic:

Protocol Address Use for
HTTP Proxy (Privoxy) 127.0.0.1:8118 Browsers, HTTP clients, system proxy
SOCKS5 (TOR) 127.0.0.1:9050 Apps that support SOCKS natively

Route terminal tools

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org
curl --socks5 127.0.0.1:9050 https://api64.ipify.org

System-wide proxy (all apps)

  1. Open System Settings → Network → Proxies
  2. Enable Web Proxy (HTTP) and enter 127.0.0.1:8118
  3. Enable SOCKS Proxy and enter 127.0.0.1:9050
  4. Click OK

Note: When the system proxy is enabled, all network-aware apps on your Mac will attempt to route through Ghost Engine. If Ghost Engine is stopped, internet access will break until you disable the proxy.

Route a browser only

If you prefer to route only your browser, configure the browser's manual proxy settings instead of the system proxy:

Setting Value
HTTP Proxy 127.0.0.1:8118
SOCKS Host 127.0.0.1:9050

After configuring, visit https://check.torproject.org/ to confirm TOR routing.


8) Notes for macOS Users

  • Ghost Engine uses its own runtime configuration for TOR and Privoxy rather than expecting you to configure them manually.
  • If Homebrew is installed under Apple Silicon paths (/opt/homebrew), the installer will automatically use that environment.
  • If you already use TOR or Privoxy for another purpose on your Mac, stop those services before running Ghost Engine to avoid port conflicts.

9) Updating or Removing Ghost Engine on macOS

Update to the latest version

bash update.sh

Uninstall Ghost Engine

bash uninstall.sh

Tip: If you ever run into startup issues on macOS, run Ghost Engine’s built-in Health Check first. It’s the quickest way to confirm whether TOR, Privoxy, ports, and exit-node routing are working properly.


🪟 Windows (WSL2 Only)

Ghost Engine runs inside WSL2 (Windows Subsystem for Linux) and provides a proxy that Windows apps and browsers can use.


1) Enable WSL2

If you don't have WSL2 set up yet:

  1. Open PowerShell as Administrator and run:
    wsl --install -d Ubuntu
  2. Restart your machine when prompted
  3. Launch Ubuntu from the Start menu and complete the initial setup (username + password)

WSL2 is recommended. WSL1 may work but has different networking behavior.


2) Clone the Repository

git clone https://github.com/naborajs/Termux-Tor-IP-Rotator.git
cd Termux-Tor-IP-Rotator

3) Run the Installer

sh bootstrap.sh install

The installer will:

  • install TOR, Privoxy, curl, and netcat via apt
  • disable the Ubuntu system TOR/Privoxy services (prevents port conflicts)
  • install the ns-ghost command into ~/.local/bin
  • add ~/.local/bin to your PATH if needed

4) Start Ghost Engine

ns-ghost

If the command is not found, open a new WSL terminal or run source ~/.bashrc.

On first launch, Ghost Engine will detect WSL and show the Windows proxy address you need in the next step.


5) Route Windows Traffic Through Ghost Engine

WSL runs in a virtual network, so Windows cannot reach the proxy at 127.0.0.1. You need the WSL instance's IP address.

Find the WSL proxy address

When Ghost Engine starts in WSL, it displays the correct proxy address at the top of the screen. It looks like:

🌐 Windows proxy address: 172.x.x.x:8118

You can also find it manually:

hostname -I | awk '{print $1}'

Configure Windows to use the proxy

  1. Open Windows Settings → Network & Internet → Proxy
  2. Enable Use a proxy server
  3. Enter the WSL IP address as the Address and 8118 as the Port
  4. Click Save

⚠ Do not use 127.0.0.1 for the Windows proxy — that points to Windows itself, not WSL. Use the IP shown by Ghost Engine.

Verify on Windows

Open a browser in Windows and visit:


6) WSL-Specific Gotchas

  • Proxy host changes between WSL restarts. Every time Windows restarts, WSL may get a new IP. Ghost Engine shows the correct address on startup.
  • If Windows internet breaks after enabling the proxy, Ghost Engine may have stopped or the IP changed. Disable the Windows proxy, restart Ghost Engine in WSL, and re-enter the new address shown.
  • Windows apps and browsers must be configured to use the proxy individually if you don't enable the system-wide proxy. Most browsers let you set a manual proxy in their network settings.
  • System TOR/Privoxy services in Ubuntu are disabled by the installer to avoid port conflicts. If you use them for other purposes, re-enable them after stopping Ghost Engine.
  • WSL1 vs WSL2: WSL1 does not have a separate network interface — in that case 127.0.0.1 does work. But WSL2 is the default and recommended version.

7) Update or Remove

Update

cd Termux-Tor-IP-Rotator
sh bootstrap.sh update

Uninstall

cd Termux-Tor-IP-Rotator
sh bootstrap.sh uninstall

🤖 Auto Debian/Ubuntu Installer (Optional but Cool)

For Debian/Ubuntu/Kali/Parrot/WSL2 users, you can create an auto installer:

Create a file called install_debian.sh:

nano install_debian.sh

Paste this inside:

#!/usr/bin/env bash set -e

echo "[*] Ghost Engine v5 — Auto Installer (Debian/Ubuntu)" echo

Check for sudo

if ! command -v sudo >/dev/null 2>&1; then echo "[!] sudo not found. Please install sudo or run as root." exit 1 fi

Update system

echo "[*] Updating system..." sudo apt update -y && sudo apt upgrade -y

Install dependencies

echo "[*] Installing dependencies (git, tor, privoxy, curl, netcat)..." sudo apt install -y git tor privoxy curl netcat || { echo "[!] Failed to install dependencies. Check your sources and try again." exit 1 }

Clone repo if needed

if [ ! -d "$HOME/Termux-Tor-IP-Rotator" ]; then echo "[] Cloning repository..." git clone https://github.com/naborajs/Termux-Tor-IP-Rotator "$HOME/Termux-Tor-IP-Rotator" else echo "[] Repo already exists. Pulling latest changes..." cd "$HOME/Termux-Tor-IP-Rotator" git pull || true fi

cd "$HOME/Termux-Tor-IP-Rotator"

Make main script executable

if [ -f "ns-ghost.sh" ]; then chmod +x ns-ghost.sh echo "[*] Running Ghost Engine..." ./ns-ghost.sh else echo "[!] ns-ghost.sh not found. Please check repository structure." exit 1 fi

echo echo "[✓] Ghost Engine setup finished. Enjoy staying anonymous 👻"

Save & exit, then:

chmod +x install_debian.sh
./install_debian.sh

This will:

Update your system

Install required packages

Clone/update the repo

Run ns-ghost.sh automatically


🌐 Route Traffic Through Ghost Engine

Once Ghost Engine is running, you can route apps, browsers, and CLI tools through its local TOR proxy.

Android / Termux (Wi-Fi Proxy)

To route your phone’s traffic through Ghost Engine:

  1. Open Settings → Wi-Fi
  2. Long-press your connected network → Modify network
  3. Expand Advanced options
  4. Set Proxy to Manual

Use:

Field Value
Hostname 127.0.0.1
Port 8118

⚠ If Ghost Engine is off while your Android proxy is still enabled, internet access may stop working until you disable the proxy.


CLI Tools (Linux / Termux / macOS / WSL)

You can also route terminal tools through Ghost Engine directly.

HTTP proxy via Privoxy

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

SOCKS5 via TOR

curl --socks5 127.0.0.1:9050 https://api64.ipify.org

If the returned IP is different from your normal ISP / mobile IP, your request is being routed through TOR.


✅ Verify That TOR Is Working

After starting Ghost Engine, always verify that your traffic is actually being routed through the TOR network before using it for browsing, research, or testing.


1) Terminal Verification

Verify through the HTTP proxy (Privoxy)

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

Verify through the SOCKS5 TOR proxy directly

curl --socks5 127.0.0.1:9050 https://api64.ipify.org

If Ghost Engine is working correctly, the IP returned above should be different from your real ISP / mobile / Wi-Fi IP.


2) Compare TOR IP vs Real IP

You can compare your normal internet IP with your TOR-routed IP:

Real IP

curl https://api64.ipify.org

TOR IP

curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

If the two IPs are different, your request is being routed through TOR.


3) Browser Verification

Open your browser after enabling Ghost Engine’s proxy and visit:

If everything is configured correctly:

  • check.torproject.org should say that you are using TOR
  • the IP shown in the browser should match the TOR IP shown inside Ghost Engine or the terminal verification commands

4) WSL / Windows Verification

If you are using Ghost Engine inside WSL, make sure you use the HTTP proxy address shown by Ghost Engine’s startup screen inside Windows proxy settings.

Then verify in Windows:

  1. Enable the manual proxy using the address shown by Ghost Engine

  2. Open a browser in Windows

  3. Visit:

If the site still shows your real IP, double-check that:

  • Ghost Engine is still running in WSL
  • the Windows proxy host and port match the values shown in the Ghost Engine startup guide
  • no old proxy settings are still enabled

5) Common Signs That TOR Is Not Working

If any of these happen, traffic may not be routed through Ghost Engine:

  • The IP shown is still your normal ISP / mobile IP
  • curl --proxy http://127.0.0.1:8118 ... fails to connect
  • Browser works normally even when Ghost Engine is stopped
  • check.torproject.org says you are not using TOR
  • The proxy is enabled, but Ghost Engine is not running

6) Recommended Quick Test Flow

Use this simple 3-step check every time:

curl https://api64.ipify.org
curl --proxy http://127.0.0.1:8118 https://api64.ipify.org
curl --socks5 127.0.0.1:9050 https://api64.ipify.org

You want:

  • the first IP = your real IP
  • the second / third IP = TOR exit IP
  • the second and third IPs should usually match or both be TOR-routed

Tip: Ghost Engine’s built-in Health Check and Current IP screens are the fastest way to confirm that TOR, Privoxy, and exit-node routing are working properly.

📘 Documentation / Guided Experience

Ghost Engine also includes a guided terminal experience with built-in help, platform-aware setup hints, and a workflow designed to keep installation and usage simple across Termux, Linux, macOS, and WSL2.

Ghost Engine Documentation Preview
Ghost Engine documentation / guided terminal workflow preview

🐞 Troubleshooting & Error Handling

If Ghost Engine is not working as expected, use the table below to quickly identify the issue, understand the likely cause, and apply the recommended fix.

Problem Likely Reason / Root Cause Recommended Fix
No internet after enabling proxy Proxy is enabled, but Ghost Engine / TOR / Privoxy is not running, or the wrong proxy host was entered Disable the proxy temporarily, start Ghost Engine again, and use the exact proxy host + port shown by Ghost Engine
WSL proxy kills Windows internet Windows is using the wrong proxy address, or Ubuntu’s default Privoxy / TOR service conflicted with Ghost Engine Re-run install.sh, let it disable conflicting system services, then use the proxy host shown in Ghost Engine’s WSL startup guide
TOR stuck at 5–20% bootstrapping Slow internet, blocked relays, unstable network, or TOR cannot reach enough nodes Wait longer, restart Ghost Engine, switch networks, or try using a VPN before TOR if your network blocks TOR relays
Same IP repeats after rotation TOR reused the same exit relay, interval is too short, or exit pool is limited Rotate again, increase the rotation interval, or let Ghost Engine restart the engine after duplicate threshold is reached
Auto-rotation shows duplicate IPs too often TOR has not had enough time to build a fresh circuit, or the chosen country / network path keeps reusing exits Increase the auto-rotation interval to 10–20 seconds and avoid rotating too aggressively
privoxy: command not found in Termux Privoxy repository package is missing or not installed correctly Run pkg update -y && pkg install tur-repo -y && pkg install privoxy -y
tor: command not found TOR is not installed or the dependency installation failed Re-run bash install.sh and make sure TOR installs successfully
Browser still shows your real IP Browser is not using Ghost Engine’s proxy, or traffic is leaking through WebRTC / bypass settings Make sure the browser is using the Ghost Engine proxy, test with check.torproject.org, and disable WebRTC if needed
Chrome still shows real IP Chrome may bypass proxy in some cases or leak IP through WebRTC Prefer Firefox for TOR proxy testing, or disable WebRTC / secure browser leaks before testing
ns-ghost: command not found Installer was not run, installation failed, or PATH was not refreshed Run bash install.sh from the repo root, then open a new terminal or reload your shell profile
Permission denied when running a script The script does not have execute permission Run chmod +x install.sh update.sh uninstall.sh ns-ghost.sh
curl: (7) Failed to connect to 127.0.0.1 TOR / Privoxy is not running, the engine failed to start, or the port is wrong Start Ghost Engine first and verify that TOR and Privoxy are listening on the configured ports
Port 8118 already in use Another Privoxy instance or system service is already using the Ghost Engine HTTP proxy port Stop the conflicting service, or re-run the installer so it disables system Privoxy / TOR services automatically
Port 9050 / 9051 already in use Another TOR process is already running in the background Kill the old TOR process or restart Ghost Engine after cleaning the old session
Ghost Engine says proxy is online but Windows browser still fails Windows proxy settings still point to an old WSL IP or an old manual proxy entry Disable the Windows proxy, restart Ghost Engine, and enter the new proxy address shown in the startup screen
Health Check fails exit node verification TOR started, but the current circuit is not fully usable yet or outbound requests are blocked Wait a few seconds, retry Health Check, or restart Ghost Engine and verify internet connectivity
Updater fails with git errors Local repo has conflicts, no internet, or the repository was not cloned properly Run git status, resolve local changes if needed, and retry bash update.sh from the Ghost Engine repo
Uninstaller removed the command but Ghost Engine data still exists The data directory was intentionally kept during uninstall Delete ~/.ns_ghost manually or run the uninstaller again and choose to remove Ghost Engine data
Ghost Engine works in terminal but not in apps The application does not support manual proxy routing or ignores system proxy settings Test first in a browser or terminal, then configure the app manually if it supports SOCKS5 / HTTP proxy settings

🛡 Shell Safety & CRLF Recovery

Ghost Engine runs on Linux, macOS, WSL, and Termux — but shell scripts must have Unix (LF) line endings, not Windows (CRLF) line endings. Editing files on Windows and then running them on WSL/Linux can cause:

$'\r': command not found
invalid option name: pipefail
syntax error near unexpected token '{\r'

How Ghost Engine prevents this

Layer Mechanism
.gitattributes Forces LF line endings for all .sh files in the repository
.editorconfig Guides editors to save shell files with LF
bootstrap.sh Strips CR from all shell scripts before dispatching commands
Self-heal in each script Every .sh file detects CRLF at startup and re-execs after cleaning
Installer CRLF fix install.sh and update.sh clean CRLF before running further commands

If you hit CRLF errors anyway

# Option 1 — use the bootstrap (recommended)
cd Termux-Tor-IP-Rotator
sh bootstrap.sh install

# Option 2 — manual fix for all shell scripts
find . -name '*.sh' -exec sh -c 'tr -d "\r" < "$1" > "$1.tmp" && mv "$1.tmp" "$1"' _ {} \;

# Option 3 — dos2unix (if installed)
find . -name '*.sh' -exec dos2unix {} +

After fixing, run sh bootstrap.sh install again.


When to Re-run the Installer

You should run install.sh again if:

  • TOR or Privoxy is missing
  • WSL / Linux is using a conflicting system TOR or Privoxy service
  • ns-ghost is not found after installation
  • the project was updated and your environment is broken
  • dependencies were removed or partially installed
bash install.sh

❓ Frequently Asked Questions

Common questions about Ghost Engine, TOR routing, privacy expectations, platform behavior, performance, and safe usage.


Question Answer
Does Ghost Engine make me completely anonymous? No. No privacy tool can honestly promise 100% anonymity. Ghost Engine helps improve network privacy by routing traffic through TOR, rotating visible exit IPs, and exposing SOCKS5 / HTTP proxy workflows.

Your privacy still depends on things like:
  • what accounts you log into
  • your browser fingerprint and extensions
  • cookies / session storage
  • DNS / WebRTC / browser leaks outside the proxy path
  • your own behavior and operational security
Think of Ghost Engine as a TOR routing and identity-rotation utility, not a magic invisibility button.
What does Ghost Engine actually do? Ghost Engine is a terminal-based toolkit that helps you work with:
  • TOR exit-node rotation
  • SOCKS5 proxy routing
  • Privoxy HTTP proxy support
  • manual and automatic identity changes
  • health checks, diagnostics, logs, and session monitoring
It is designed to make TOR-based proxy workflows easier across Termux, Linux, macOS, and WSL.
Can I use a VPN together with Ghost Engine? Yes. A common setup is:

You → VPN → TOR (Ghost Engine) → Internet

That means your ISP sees a VPN connection, and TOR traffic goes out through the VPN. This can be useful in places where TOR traffic is blocked or monitored.

Just remember the trade-offs:
  • higher latency
  • more moving parts
  • you are placing some trust in your VPN provider
Ghost Engine does not require a VPN, but it can be used with one if that fits your setup.
Will my internet speed or ping be worse? Yes — usually. TOR adds multiple encrypted relay hops, which means:
  • higher latency / ping
  • slower downloads and page loads compared to direct internet
  • less consistent performance depending on exit-node quality
Ghost Engine is a privacy / routing / experimentation tool, not a low-latency gaming or streaming accelerator.
Can I route my browser through Ghost Engine? Yes. Ghost Engine exposes:
  • SOCKS5 TOR proxy (default TOR port, usually 9050)
  • HTTP proxy through Privoxy (usually 8118)
You can configure supported browsers or apps to use those proxy endpoints.

On WSL, Ghost Engine also shows the Windows-side proxy address you should use if you want Windows apps or browsers to route through the WSL-hosted proxy.
Why does the same IP sometimes repeat after rotation? That can happen because TOR is not an infinite IP generator. A repeated IP does not automatically mean Ghost Engine is broken.

Reasons include:
  • TOR reused the same exit relay
  • the interval between rotations is too short
  • the available exit-node pool is limited for the current route / country / network path
Ghost Engine’s duplicate tracking and restart logic helps reduce this, but it cannot force TOR to always give a brand-new exit IP on every single request.
Can Ghost Engine force a new TOR IP every time? Not guaranteed. Ghost Engine can request a new TOR identity and rotate circuits, but the final exit node chosen still depends on TOR’s network behavior.

So Ghost Engine can request and automate identity changes, but it cannot guarantee that every rotation will produce a totally unique public IP.
What’s the difference between the SOCKS5 proxy and the HTTP proxy? Ghost Engine gives you two common ways to route traffic:
  • SOCKS5 (TOR directly) — useful for apps or tools that support SOCKS proxies natively.
  • HTTP Proxy (Privoxy) — useful for apps or browsers that prefer a normal HTTP proxy endpoint.
Both ultimately route through TOR, but the app compatibility and configuration flow may differ.
Does Ghost Engine change my entire system traffic automatically? No, not by itself. Ghost Engine provides proxy endpoints and rotation tooling. Traffic only goes through Ghost Engine if:
  • your application is configured to use Ghost Engine’s proxy, or
  • your operating system / browser is pointed at the proxy Ghost Engine provides
If an app is not using the proxy, Ghost Engine will not magically capture it.
Can I use Ghost Engine on WSL? Yes. Ghost Engine supports WSL2, and the installer / startup flow is designed to help with the common WSL proxy issues.

In WSL, Ghost Engine can:
  • run TOR and Privoxy inside the Linux environment
  • show the proxy host / port needed by Windows
  • help avoid conflicts with default system TOR / Privoxy services
If you want Windows apps to use Ghost Engine, use the proxy host and port shown by Ghost Engine rather than assuming it is always plain localhost.
Why does enabling the Windows proxy sometimes break internet in WSL setups? Usually one of these is happening:
  • Windows is pointing to the wrong proxy address
  • Ghost Engine is not running anymore
  • a conflicting system Privoxy / TOR service is still active
  • the proxy host changed between WSL sessions
The safest fix is:
  1. disable the Windows proxy temporarily
  2. restart Ghost Engine
  3. use the exact proxy host + port shown in Ghost Engine’s startup guide
Can I use Ghost Engine on Android? Yes — through Termux. That is one of the main supported platforms.

The recommended setup is:
  • install Termux from F-Droid
  • clone the Ghost Engine repository
  • run bash install.sh
  • launch with ns-ghost
Some Android apps may not honor the proxy automatically, so results depend on the app you are using.
Does Ghost Engine work on macOS and Linux too? Yes. Ghost Engine supports:
  • Android / Termux
  • Linux (Debian / Ubuntu / Kali / Parrot and similar apt-based systems)
  • macOS (Intel and Apple Silicon)
  • WSL2
The installer detects the platform and installs / prepares the environment accordingly.
How do I verify that TOR is actually working? A quick check is to compare your normal IP and your TOR-routed IP.

Real IP:
curl https://api64.ipify.org

TOR IP through Ghost Engine:
curl --proxy http://127.0.0.1:8118 https://api64.ipify.org

If those IPs are different, traffic is being routed through TOR. You can also verify in a browser with:
Why does Ghost Engine include both logs and a health check? Because proxy / TOR setups can fail in several different ways:
  • internet is down
  • TOR did not bootstrap
  • Privoxy did not start
  • ports are already in use
  • exit-node verification failed
The built-in Health Check and status / log screens help you quickly see whether the problem is internet-related, TOR-related, proxy-related, or platform-related.
Can I use Ghost Engine for illegal activity, abuse, or unauthorized access? No. Ghost Engine is intended for:
  • privacy-focused experimentation
  • learning and education
  • research and controlled testing
  • legitimate TOR / proxy workflows
You are responsible for how you use the tool and for complying with your local laws, service rules, and network policies.
Can I contribute to Ghost Engine? Absolutely. If you want to help improve Ghost Engine, you can:
  • open an issue for a bug or feature request
  • submit a pull request for fixes, improvements, or documentation upgrades
  • test the project on your platform and report what works / what breaks
Useful links:

Still have a question, found a bug, or want to suggest an improvement?

Open an Issue Open a Pull Request Project Discussions

💖 Support & Contribute

Ghost Engine is an independent open-source project built through testing, debugging, experimentation, and a lot of iteration.

If it helps you, the best support is simple: star the repo, report bugs, suggest improvements, or open a pull request.

Please read our CODE_OF_CONDUCT.md before participating in issues, discussions, or pull requests.

⭐ Support 🛠 Contribute 📬 Collaborate
Star the repo, share it, and give feedback Fix bugs, improve docs, refine features, or polish the UX Open an Issue or Pull Request and I’ll take a look at it


🪙 Donation Addresses

Cryptocurrency Address
Bitcoin (BTC) bc1q5zapes7euft2lrk7ylpwj90p8y4ctmadn285du

✨ Even the smallest support means something —
not because of the money…
but because it tells me:

"Someone out there believes in this project."

Thank you for being here —
and thank you for keeping the Ghost alive 👻💙


🧠 Know More About Ghost

Ghost Engine also includes a built-in project knowledge screen that introduces the framework, its purpose, platform support, privacy workflow, and core ideas directly inside the terminal UI.

Know More About Ghost Preview
Built-in project knowledge / “Know More About Ghost” terminal preview

👤 Author & Contact

Ghost Engine is built and maintained by Naboraj Sarkar
also known online as Nishant Sarkar.

Developer • Builder • Creator • NS CODEX


Business Email Website GitHub

YouTube Telegram Instagram X / Twitter

🧠 Focus Areas ⚙️ Project Style 🌍 Ecosystem
Privacy Tools, Automation, Bots, Utility Projects Terminal-first, Cross-platform, Practical, Experimental Ghost Engine, NS GAMMING, NS CODEX

If you find a bug, want to suggest a feature, or want to contribute to Ghost Engine, feel free to open an issue on GitHub or reach out through one of the platforms above.

Built with 💙 by Naboraj Sarkar • Open-source privacy tooling and terminal experiments


🏷 License

This project is licensed under the MIT License. You are free to use, modify, and redistribute — as long as proper credit is given.


⭐ If this project helped you —

PLEASE STAR ⭐ THE REPOSITORY


💙 Stay Anonymous 💙 Stay Secure 💙 Stay Ghost 👻