https://github.com/graveeatermadison/shadowproxy
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
https://github.com/graveeatermadison/shadowproxy
anonymity automation bash-script cybersecurity google-colab ip-rotation linux macos networking privacy proxy tor user-agent-rotation web-scraping
Last synced: about 2 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/graveeatermadison/shadowproxy
- Owner: GraveEaterMadison
- License: mit
- Created: 2025-03-30T10:18:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T14:11:24.000Z (over 1 year ago)
- Last Synced: 2025-03-30T15:22:37.931Z (over 1 year ago)
- Topics: anonymity, automation, bash-script, cybersecurity, google-colab, ip-rotation, linux, macos, networking, privacy, proxy, tor, user-agent-rotation, web-scraping
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Running in Google Colab](#running-in-google-colab)
- [How It Works](#how-it-works)
- [Troubleshooting](#troubleshooting)
- [License](#license)
---
## βοΈ 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**
```bash
git clone https://github.com/GraveEaterMadison/ShadowProxy.git
cd ShadowProxy
```
### **2οΈβ£ Give Execute Permission**
```bash
chmod +x shadowproxy_setup.sh
```
---
## βΆοΈ Usage
### **Run the Script**
```bash
./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**
```bash
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](https://colab.research.google.com/).
### **2οΈβ£ Run the following commands in a Colab notebook**
```python
!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**
```python
!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:
```bash
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:
```bash
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:
```bash
export USER_AGENT="$RANDOM_USER_AGENT"
```
---
## π οΈ Troubleshooting
β **Tor service is not starting**\
β‘ Try restarting it manually:
```bash
sudo systemctl restart tor
```
β **Proxy test failed**\
β‘ Check if Tor is running:
```bash
ps aux | grep tor
```
β‘ Try running manually:
```bash
torsocks curl https://check.torproject.org/
```
---
## π License
This project is licensed under the **MIT License**. Feel free to use and modify it.