Skip to content

erayerturk/shadowplug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

shadowplug Dashboard

shadowplug

Plug & play USB privacy dongle, powered by Raspberry Pi Zero 2 W.
No apps. No drivers. Just plug it in, turn off WiFi, and browse anonymously through VPN or residential proxy.

✨ Features

Feature Description
⌁ Plug & Play Auto-detected as Ethernet on Windows (RNDIS) and macOS (ECM)
πŸ›‘οΈ WireGuard VPN Fast, modern VPN with multi-profile support
🌍 Residential Proxy Transparent proxy through residential IPs with SNI extraction
🚫 Ad & Tracker Blocking DNS-level blocking (StevenBlack, AdAway, malware lists)
πŸ”€ Split Tunneling Route specific IPs outside the VPN
🎲 MAC Randomization WiFi MAC auto-changes on each boot. Manual change from dashboard too
πŸ“Š Bandwidth Monitor Real-time transfer stats and speed measurement
πŸ”’ Leak Protection DNS leak prevention, WebRTC blocking, kill switch
🌐 DNS Management Google, Cloudflare, Quad9 presets or custom servers
πŸ–₯️ Web Dashboard Manage everything from 192.168.7.1

Software VPN vs ShadowPlug

Software VPN ShadowPlug
Installation App on every device Plug in USB, done
Scope Per-app or per-device All traffic, OS-level
Leak risk App crash = IP exposed Hardware-level, no leaks
Detection VPN process detectable Invisible to OS
Portability Tied to device install Carry between any computer
Ad blocking Separate tool needed Built in
Residential proxy Not available Built-in rotation
Kill switch Software-based, can fail Network-level, always on
Speed Full speed ~30-40 Mbps VPN / ~12-15 Mbps proxy

πŸ’‘ Speed note: The Pi Zero 2 W uses USB 2.0. In real-world tests, WireGuard VPN reaches ~30-40 Mbps (datacenter IP) and residential proxy ~12-15 Mbps (ISP routing overhead). More than enough for web browsing, video calls, and standard streaming.

🧰 Requirements

Hardware

  • Raspberry Pi Zero 2 W
  • microSD card (4 GB+)
  • USB cable:
    • Windows: micro-USB β†’ USB-A
    • Mac: micro-USB β†’ USB-C (direct cable, not adapter)

Software

VPN Server

A server running WireGuard is required. Any VPS provider works (Hetzner, DigitalOcean, Vultr, etc.) or any WireGuard-compatible commercial VPN.

Residential Proxy (optional)

For residential IP masking, you'll need a proxy service that supports HTTP CONNECT with authentication. Works with any compatible provider.

πŸš€ Quick Start

1. Flash OpenWrt to SD Card

Download the Raspberry Pi Zero 2 W image and flash it:

gunzip -c openwrt-*.img.gz | sudo dd of=/dev/sdX bs=4M status=progress

2. SSH in and Run the Installer

ssh root@192.168.1.1
wget -O- https://raw.githubusercontent.com/erayerturk/shadowplug/main/setup/install.sh | sh

The script will guide you through everything interactively:

⌁ shadowplug Installer

[1/8] WiFi Setup
  WiFi SSID: MyHomeWiFi
  WiFi Password: supersecret123
  Connected!

[2/8] Installing packages...
[3/8] Installing Python dependencies...
[4/8] Setting up USB gadget...
[5/8] Configuring network...
[6/8] Configuring firewall...

[7/8] Setting up WireGuard...
  Your Pi's public key (add this to your VPN server):
  aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcdefg=

Configure VPN server now? (y/n): y
  Server IP: 49.13.x.x
  Server Port [51820]: 51820
  Server Public Key: xYzAbCdEfGhIjKlMnOpQrStUvWxYz1234567890xyz=
  Client Address [10.7.0.2/24]: 10.7.0.2/24
  VPN configured!

[8/8] Setting up ShadowPlug web UI...

  βœ… Installation complete!

  1. Plug the Pi into your computer via USB
  2. Open http://192.168.7.1
  3. Configure your VPN server

3. Use It

  1. Plug the Pi into your computer via USB
  2. Turn off WiFi on your computer
  3. Open http://192.168.7.1 and configure VPN or proxy
  4. Verify: curl ifconfig.me should show your VPN/proxy IP
Need a VPN server? Run this on any VPS
wget -O- https://raw.githubusercontent.com/erayerturk/shadowplug/main/setup/server-setup.sh | sudo sh

πŸ—οΈ Architecture

ShadowPlug Architecture - VPN vs Proxy Mode

Project Structure

shadowplug/
β”œβ”€β”€ README.md
β”œβ”€β”€ setup/
β”‚   β”œβ”€β”€ install.sh               # Pi-side automated installer
β”‚   β”œβ”€β”€ server-setup.sh          # VPN server setup script
β”‚   └── configs/
β”‚       β”œβ”€β”€ usb-gadget           # USB RNDIS+ECM composite init
β”‚       β”œβ”€β”€ wg0.conf.template    # WireGuard config template
β”‚       β”œβ”€β”€ hotplug-usb-ip       # Carrier-based IP assignment
β”‚       └── shadowplug-service  # Web UI init script
└── web/
    β”œβ”€β”€ app.py                   # Flask API backend
    β”œβ”€β”€ proxy_server.py          # Transparent proxy engine
    β”œβ”€β”€ requirements.txt
    └── static/
        β”œβ”€β”€ index.html           # Dashboard SPA
        β”œβ”€β”€ style.css            # Dark theme
        └── app.js               # Frontend logic

Transparent Proxy Flow

Mac/PC TCP traffic
  β†’ iptables PREROUTING (REDIRECT to :12345)
    β†’ proxy_server.py
      β†’ SO_ORIGINAL_DST (recovers real destination IP)
      β†’ TLS Client Hello SNI extraction (recovers domain name)
      β†’ HTTP CONNECT with auth to upstream proxy
        β†’ Residential proxy exit
  • QUIC (UDP 443) is automatically blocked to force browsers to use TCP
  • DNS is served by the Pi's local dnsmasq with MASQUERADE for upstream
  • No redsocks - direct kernel-to-Python socket handoff via SO_ORIGINAL_DST

πŸ–₯️ Dashboard

Tab Description
VPN WireGuard config, key generation, connection test, profile switching
Blocking DNS-level ad/tracker/malware blocking with custom domains
Network MAC randomization, bandwidth stats, split tunneling, firewall
Privacy DNS leak protection, WebRTC blocking, kill switch
Proxy Residential proxy config and transparent proxy management
DNS DNS server settings with quick presets
System CPU temperature, RAM, load average, reboot

πŸ”§ Troubleshooting

Issue Solution
Windows: Unknown device Device Manager β†’ Update driver β†’ Network β†’ Microsoft β†’ Remote NDIS
Mac: No ethernet appearing Use a direct micro-USB β†’ USB-C cable (not via adapter)
Can't access dashboard Check if Flask is running: ps | grep python
VPN not connecting Verify keys match on both server and Pi
Blocking not working Restart dnsmasq: /etc/init.d/dnsmasq restart
Proxy: still seeing VPN IP Restart Chrome (clears QUIC cache) after enabling proxy
Proxy: 403 Forbidden Some non-standard ports (8080, etc.) are blocked by residential proxies
No internet with WiFi off Verify DHCP DNS is set to 192.168.7.1

πŸ“¬ Contact

Questions, feedback, or collaboration: contact@erayerturk.com

πŸ“„ License

MIT

About

πŸ›‘οΈ USB privacy dongle powered by Raspberry Pi Zero 2 W β€” plug in, disable WiFi, and all traffic routes through WireGuard VPN or residential proxy. Web dashboard included.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors