Skip to content

ShadowProxy is an automated Tor proxy setup with built-in IP rotation and User-Agent spoofing, enhancing privacy and anonymity for web scraping, bot automation, and secure browsing. It ensures seamless proxy switching to bypass detection mechanisms and maintain persistent anonymity online

License

Notifications You must be signed in to change notification settings

GraveEaterMadison/ShadowProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ShadowProxy: Tor Proxy with User-Agent Rotation

This repository provides a Bash script that automates the setup of a Tor proxy with User-Agent rotation, ensuring anonymity and privacy when accessing the web. This script is particularly useful for Reddit bots or web scrapers that need to cycle IPs and avoid detection.

🚀 Features

✅ Installs and configures Tor automatically
✅ Rotates IP every 10 minutes using Tor’s control port
✅ Randomizes User-Agent every 5 minutes to evade detection
✅ Verifies that the Tor proxy is working correctly
✅ Supports Linux and macOS


📌 Table of Contents


⚙️ Requirements

Before running the script, make sure you have the following:

  • Linux or macOS (Windows users can use WSL or a virtual machine)
  • Git installed
  • Tor and Torsocks (automatically installed by the script if missing)

🛠️ Installation

1️⃣ Clone the Repository

git clone https://github.com/GraveEaterMadison/ShadowProxy.git
cd ShadowProxy

2️⃣ Give Execute Permission

chmod +x shadowproxy_setup.sh

▶️ Usage

Run the Script

./shadowproxy_setup.sh

This will:

  • Install Tor if it's missing
  • Configure Tor proxy (Socks5 on 127.0.0.1:9050)
  • Rotate IP every 10 minutes
  • Change User-Agent every 5 minutes
  • Verify that the proxy is working

Check if Tor Proxy is Working

torsocks curl https://check.torproject.org/

If the setup was successful, you should see:

Congratulations! This browser is configured to use Tor.


📡 Running in Google Colab

You can run this script in Google Colab using the following steps:

1️⃣ Open Google Colab

Go to Google Colab.

2️⃣ Run the following commands in a Colab notebook

!apt update && apt install -y tor torsocks
!echo -e "SocksPort 9050\nControlPort 9051\nCookieAuthentication 1\nRunAsDaemon 1" > /etc/tor/torrc
!service tor start

3️⃣ Check if Tor is Running

!torsocks curl https://check.torproject.org/

🔍 How It Works

1️⃣ Installing Dependencies

The script checks for Tor and Torsocks. If they are not installed, it installs them based on the operating system:

  • Linux: sudo apt install -y tor torsocks
  • macOS: brew install tor torsocks

2️⃣ Configuring Tor

It modifies the Tor configuration file (/etc/tor/torrc) to ensure the proxy runs correctly:

SocksPort 9050
ControlPort 9051
CookieAuthentication 1
RunAsDaemon 1

3️⃣ Rotating IPs

Every 10 minutes, the script sends a NEWNYM signal to Tor to change the IP address:

echo -e "AUTHENTICATE \"$COOKIE\"\r\nSIGNAL NEWNYM\r\nQUIT" | nc localhost 9051

4️⃣ Changing User-Agents

Every 5 minutes, the script selects a random User-Agent from a predefined list:

export USER_AGENT="$RANDOM_USER_AGENT"

🛠️ Troubleshooting

Tor service is not starting
➡ Try restarting it manually:

sudo systemctl restart tor

Proxy test failed
➡ Check if Tor is running:

ps aux | grep tor

➡ Try running manually:

torsocks curl https://check.torproject.org/

📜 License

This project is licensed under the MIT License. Feel free to use and modify it.

About

ShadowProxy is an automated Tor proxy setup with built-in IP rotation and User-Agent spoofing, enhancing privacy and anonymity for web scraping, bot automation, and secure browsing. It ensures seamless proxy switching to bypass detection mechanisms and maintain persistent anonymity online

Topics

Resources

License

Stars

Watchers

Forks

Languages